刚开始的错误信息是
- upstream timed out (110: Connection timed out) while reading response header from upstream
给相关的nginx代理层加了timeout配置:
- # time out settings
- proxy_connect_timeout 600s;
- proxy_send_timeout 600;
- proxy_read_timeout 600;
接着出现的错误:
- 504 gateway time out
我们的容器环境是uwsgi django
首先在nginx uwsgi_params配置中添加了
- uwsgi_connect_timeout 600;
- uwsgi_read_timeout 600;
- uwsgi_send_timeout 600;
其次在uwsgi.ini配置中添加了:
- harakiri=1200
- uwsgi_send_timeout=600
问题基本解决。
参考资料:
http://stackoverflow.com/questions/18740635/nginx-upstream-timed-out-110-connection-timed-out-while-reading-response-hea
http://www.codes51.com/article/detail_112864.html