我有一个 Python Django 应用,使用 Nginx + uWSGI 进行部署。
在我的 nginx.conf
文件中,我有以下内容:
location / {
include uwsgi_params;
uwsgi_pass 127.0.0.1:9001;
uwsgi_read_timeout 1800;
uwsgi_send_timeout 300;
client_header_timeout 300;
proxy_read_timeout 300;
index index.html index.htm;
}
但对于在uWSGI上长时间运行约1分钟才能完成的请求,我在Nginx错误日志中得到了超时错误,如下所示:
2013/04/22 12:35:56 [error] 2709#0: *1 upstream timed out (110: Connection timed out) while reading response header from upstream, client: xx.xx.xx.xx, server: , request: "GET /entity/datasenders/ HTTP/1.1", upstream: "uwsgi://127.0.0.1:9001", host: "xxx.xx.xx.x"
我已经将头部超时和uWSGI发送/读取超时设置为5分钟,请问有什么办法可以解决这个问题吗?