NGINX + FLASK + UWSGI 502 upstream prematurely close connection
При загрузке и длительной обработке данных постоянно появляется 502. В uwsgi logs ошибок нет. Очень нужна помощь в решении проблемы.
app.ini
[uwsgi]
module = wsgi:app
master = true
processes = 5
socket = app.sock
chmod-socket = 664
vacuum = true
daemonize = /var/log/wsgi/app.log
touch-reload = /var/www/wa.binotel/app.py
die-on-term = true
enable-threads = false
harakiri = 3000
socket-timeout = 3000
limit-post = 5120000
post-buffering = 5120000
nginx
server {
listen 80;
server_name wa.binotel.space www.wa.binotel.space;
location / {
include uwsgi_params;
uwsgi_pass unix:/var/www/wa.binotel/app.sock;
uwsgi_read_timeout 3000s;
uwsgi_send_timeout 3000s;
}
client_max_body_size 1000M;
sendfile on;
keepalive_timeout 0;
send_timeout 3000s;
proxy_connect_timeout 3000s;
proxy_send_timeout 3000s;
proxy_read_timeout 3000s;
fastcgi_send_timeout 3000s;
fastcgi_read_timeout 3000s;
uwsgi_read_timeout 3000s;
uwsgi_send_timeout 3000s;
}