For some reason nginx is stopping any new requests after a while (2 minutes) whenever a long running request (5 minutes) is being handled.
user www-data www-data;
worker_processes 4;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 200;
client_max_body_size 12M;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 9;
gzip_buffers 16 8k;
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
include /usr/local/nginx/sites/*.conf;
}
Can this be a problem due to uwsgi settings?
[uwsgi]
module=project.wsgi_de:application
socket=127.0.0.1:...
chdir=/var/www/...
pidfile=/tmp/project-master.pid
max-requests=5000
limit-as=1024
master=True
vacuum=True
processes=5
If you reach 5 concurrent long running requests this is the expected behaviour, as uWSGI is running with 5 processes