Hi,
When launching long time process such “Generate Stock Quantity Issues” wizard, I get “502 Bad Gateway” error after some time. (Nginx error log: “upstream prematurely closed connection while reading response header from upstream”)
My server is launched with gunicorn behind nginx.
Here’s my nginx configuration:
server {
listen 8000;
server_name trytond-server;
client_max_body_size 100M;
location / {
proxy_pass http://unix:/srv/tryton/7.2/trytond.sock;
proxy_read_timeout 600s;
proxy_connect_timeout 75s;
}
}
and my gunicorn configuration:
wsgi_app = 'trytond.application:app'
bind = 'unix:/srv/tryton/7.2/trytond.sock'
workers = 5
worker_class = 'gevent'
worker_connections = 1000
timeout = 600
raw_env = [
'TRYTOND_CONFIG=/srv/tryton/7.2/trytond.conf',
'TRYTOND_DATABASE_NAMES = tryton_preciball_prod_72',
'TRYTOND_LOGGING_CONFIG=/srv/tryton/7.2/trytond_log.conf',
]
PYTHONOPTIMIZE = 1
Any advice to avoid such error ? Thanks.