Hello there,
I'm facing an issue with Odoo version 11. I'm getting Longpolling error in my Inspector.
Here's the error log from Nginx:
2018/01/13 09:33:31 [error] 20300#20300: *476 connect() failed (111: Connection refused) while connecting to upstream, client: XX.XX.XX.XX, server: , request: "POST /longpolling/poll HTTP/1.1", upstream: "http://127.0.0.1:8072/longpolling/poll", host: "XX.XX.XX.XX", referrer: "http://XX.XX.XX.XX/web"
2018/01/13 09:33:42 [error] 20300#20300: *476 connect() failed (111: Connection refused) while connecting to upstream, client: XX.XX.XX.XX, server: , request: "POST /longpolling/poll HTTP/1.1", upstream: "http://127.0.0.1:8072/longpolling/poll", host: "XX.XX.XX.XX", referrer: "http://XX.XX.XX.XX/web"
I'm using Nginx as a reverse proxy, and here's my config:
upstream backend-odoo {
server 127.0.0.1:8069;
}
upstream backend-odoo-im {
server 127.0.0.1:8072;
}
server {
listen 80;
#server_name yourdomainname.com;
add_header Strict-Transport-Security max-age=2592000;
location / {
proxy_pass http://backend-odoo;
proxy_read_timeout 300000;
# proxy header and settings
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect off;
# odoo log files
access_log /var/log/nginx/odoo-access.log;
error_log /var/log/nginx/odoo-error.log;
# increase proxy buffer size
proxy_buffers 16 64k;
proxy_buffer_size 128k;
# force timeouts if the backend dies
proxy_next_upstream error timeout invalid_header http_500
http_502 http_503;
# enable data compression
gzip on;
gzip_min_length 1100;
gzip_buffers 4 32k;
gzip_types text/plain application/x-javascript text/xml text/css;
gzip_vary on;
client_max_body_size 500M;
}
location ~* /web/static/ {
# cache static data
proxy_cache_valid 200 60m;
proxy_buffering on;
expires 864000;
proxy_pass http://backend-odoo;
}
location /longpolling {
proxy_pass http://backend-odoo-im;
}
}
Since I'm running Odoo on a remote server with 1CPU, I changed the number of workers to be 3 and enabled proxy mode.
Here's my Odoo config, I changed only two parameters:
proxy_mode = True
workers = 3
I'm not quite sure what's wrong with these configurations and why I'm getting this error!