[英]504 Gateway Time-out nginx/1.10.3 (Ubuntu)
I'm trying to host django 1.11 application on ubuntu 16.4 server using Nginx. 我正在尝试使用Nginx在Ubuntu 16.4服务器上托管Django 1.11应用程序。 But After running the server I'm getting
504 Gateway Time-out
但是运行服务器后,我收到
504 Gateway Time-out
here is my all port log 这是我的所有端口日志
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN 3209/redis-server 1
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 15218/nginx -g daem
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1204/sshd
tcp6 0 0 :::9200 :::* LISTEN 28810/java
tcp6 0 0 :::9300 :::* LISTEN 28810/java
tcp6 0 0 :::22 :::* LISTEN 1204/sshd
udp 0 0 0.0.0.0:68 0.0.0.0:* 963/dhclient
command=/home/ubuntu/miniconda3/envs/ok/bin/gunicorn --access-logfile - --workers 3 --limit-request-line 8000 --bind unix:/home/ubuntu/app/socks/ok.sock configuration.wsgi:application directory=/home/ubuntu/app/onekkom/backend user=ubuntu group=www-data chmod=664 autostart=true autorestart=true stderr_logfile=/var/log/ok_prod_gunicorn.err.log stdout_logfile=/var/log/ok_prod_gunicorn.out.log
Nginx error.log Nginx error.log
*1 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 118.179.95.25, server: 18.136.204.142, requ$
* 1上游超时(110:连接超时),同时从上游读取响应头,客户端:118.179.95.25,服务器:18.136.204.142,要求$
2019/07/24 18:13:13 [error] 15221#15221: *1 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 118.179.95.25, server: 18.136.204.142, requ$
2019/07/24 18:13:13 [错误] 15221#15221:* 1从上游读取响应标头时上游超时(110:连接超时),客户端:118.179.95.25,服务器:18.136.204.142,re $
2019/07/24 18:20:17 [error] 15485#15485: *1 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 118.179.95.25, server: 18.136.204.142, requ$
2019/07/24 18:20:17 [错误] 15485#15485:* 1从上游读取响应头时上游超时(110:连接超时),客户端:118.179.95.25,服务器:18.136.204.142,re $
any one have any idea about this issue? 有人对这个问题有任何想法吗? any sort of help will be appreciated
任何形式的帮助将不胜感激
Gunicorn times out after 30 seconds by default. Gunicorn默认情况下在30秒后超时。 It is most likely a gunicorn timeout, and not an nginx timeout.
这很可能是Gunicorn超时,而不是Nginx超时。 You can increase the timeout in the gunicorn settings.
您可以在Gunicorn设置中增加超时时间。 Generally, you may want to do something about the request that is taking over 30 seconds.
通常,您可能需要处理超过30秒的请求。
http://docs.gunicorn.org/en/stable/settings.html http://docs.gunicorn.org/en/stable/settings.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.