Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Django Gunicorn Nginx工作线程超时上游超时错误_Django_Nginx_Ubuntu 16.04_Gunicorn_Supervisord - Fatal编程技术网

Django Gunicorn Nginx工作线程超时上游超时错误

Django Gunicorn Nginx工作线程超时上游超时错误,django,nginx,ubuntu-16.04,gunicorn,supervisord,Django,Nginx,Ubuntu 16.04,Gunicorn,Supervisord,我在AzureUbuntuVM服务器上的Django、Gunicorn和Nginx上运行了一个web应用程序。当运行更长的请求时,请求超时并转到504/502超时错误。我尝试在Nginx和GUnicorn配置中更改超时选项,但没有成功。下面是我的配置文件 Nginx.conf server { listen 80; server_name 0.0.0.0; location /static { alias /home/rootadmin/WeIntelli/static; } loc

我在AzureUbuntuVM服务器上的Django、Gunicorn和Nginx上运行了一个web应用程序。当运行更长的请求时,请求超时并转到504/502超时错误。我尝试在Nginx和GUnicorn配置中更改超时选项,但没有成功。下面是我的配置文件

Nginx.conf

server {
listen 80;
server_name 0.0.0.0;

location /static {
    alias /home/rootadmin/WeIntelli/static;
}

location / {
    proxy_pass http://unix:/home/rootadmin/WeIntelli/WeIntelli.sock;
    proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_connect_timeout 900;
proxy_send_timeout 900;
proxy_read_timeout 900;
proxy_buffers 32 4k;
}
[program:WeatherIntelligence]
directory=/home/rootadmin/WeIntelli

command=/home/rootadmin/WeIntelli/venv/bin/gunicorn --log-level=debug --workers=5 --timeout=600 --keep-alive=600 --worker-class=gthread --threads=3 --bind unix:/home/rootadmin/WeIntelli/WeIntelli.sock WeIntelli.wsgi:application

user=rootadmin
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
stderr_logfile=/home/rootadmin/WeIntelli/WeIntelli.err.log
stdout_logfile=/home/rootadmin/WeIntelli/WeIntelli.out.log
}

Supervisor.conf

server {
listen 80;
server_name 0.0.0.0;

location /static {
    alias /home/rootadmin/WeIntelli/static;
}

location / {
    proxy_pass http://unix:/home/rootadmin/WeIntelli/WeIntelli.sock;
    proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_connect_timeout 900;
proxy_send_timeout 900;
proxy_read_timeout 900;
proxy_buffers 32 4k;
}
[program:WeatherIntelligence]
directory=/home/rootadmin/WeIntelli

command=/home/rootadmin/WeIntelli/venv/bin/gunicorn --log-level=debug --workers=5 --timeout=600 --keep-alive=600 --worker-class=gthread --threads=3 --bind unix:/home/rootadmin/WeIntelli/WeIntelli.sock WeIntelli.wsgi:application

user=rootadmin
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
stderr_logfile=/home/rootadmin/WeIntelli/WeIntelli.err.log
stdout_logfile=/home/rootadmin/WeIntelli/WeIntelli.out.log
请你帮我解决这个问题,提前谢谢