장기 실행 요청은 다른 모든 요청을 차단합니다.

장기 실행 요청은 다른 모든 요청을 차단합니다.

어떤 이유로 nginx는 장기 실행 요청(5분)이 처리될 때마다 잠시(2분) 후에 새 요청을 중지합니다.

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;
}

uwsgi 설정으로 인해 이것이 문제가 될 수 있습니까?

[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

답변1

5개의 동시 장기 실행 요청에 도달하면 uWSGI가 5개의 프로세스로 실행되므로 이는 예상되는 동작입니다.

관련 정보