Odoo NGINX Timeout Issue
Timeout Issue on Load
Issue: https://www.odoo.com/forum/help-1/question/timeout-error-with-nginx-88687
After install nginx and setup reverse proxy for my instance, I am gettings a timeout error whille installing a module.
I have tested directly by instance IP address and it works fine.
XmlHttpRequestError Gateway Time-out
<html>
<head><title>504 Gateway Time-out</title></head>
<body bgcolor="white">
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx/1.4.6 (Ubuntu)</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
------------------------------------------------------------------------------------------------------------
Solution:
sudo vim /etc/nginx/sites-enabled/IP-ADDRESS
Add proxy_read_timeout 300000; on above file.....
==========================================
location / {
proxy_pass http://oddo;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
proxy_read_timeout 300000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
==========================================
After changin above:
sudo /etc/init.d/nginx restart
sudo /etc/init.d/odoo-server restart