django+uwsgi+nginx - 错误:nginx:504 Gateway Time out
来源:互联网 发布:js给input的添加属性 编辑:程序博客网 时间:2024/05/24 04:59
分析
504 Gateway Time out
原因是因为相关参数设置的不当,还是很容易解决的
nginx和uwsgi整合时有三个参数可以用于设置超时时间:
1.uwsgi_connect_timeout:
默认60秒,与uwsgi-server连接的超时时间,该值不能超过75秒.若在超时时间内未能成功连接则断开连接尝试
2.uwsgi_read_timeout:
默认60秒,nginx等待uwsgi进程发送响应数据的超时时间。若有需要长时间运行才能产生输出结果的uwsgi进程则需将此参数调高。若在错误日志文件中看到
upstream timed out需将此参数调高。若超过超时时间还未收到响应则nginx关闭连接
3.uwsgi_send_timeout:
默认60秒,nginx向uwsgi进程发送请求的超时时间。超时时间由两次写操作的时间间隔算,而非整个请求。若超过超时时间仍没写入动作则nginx关闭连接
另外:uwsgi自身还有一个参数harakiri,若每次请求需要花费超过该值的时间则放弃该请求处理相应的worker被收回
我的实例:
uwsgi.ini
nginx.conf
xtyw_file.conf->location(此配置通过nginx.conf里的include导入生效)
0 0
- django+uwsgi+nginx - 错误:nginx:504 Gateway Time out
- nginx + uwsgi - 错误: nginx:504 Gateway Time out
- nginx:504 Gateway Time out 错误
- nginx 504 Gateway Time-out错误解决办法
- nginx 504 Gateway Time-out
- 504gateway time out nginx
- Nginx 504 Gateway Time-out
- 解决504 Gateway Time-out(nginx)
- 解决 502、504 Gateway Time-out(nginx)
- 解决 502、504 Gateway Time-out(nginx)
- 解决 502、504 Gateway Time-out(nginx)
- 完美解决Nginx 504 Gateway time-out
- NGINX出现 504 Gateway time-out
- 解決Nginx 504 Gateway time-out问题
- 解决 502、504 Gateway Time-out(nginx)
- nginx 504 Gateway Time-out 解决办法
- 完美解决Nginx 504 Gateway time-out 502 Bad Gateway
- nginx+tomcat nginx 504 Gateway Time-out的方法
- 算法训练 最短路
- LeetCode70——Climbing Stairs
- xarmain使用Forms编译android工程出现support_r19.0.1.zip支持包错误
- 欢迎使用CSDN-markdown编辑器
- Java编程中最容易忽略的10个问题
- django+uwsgi+nginx - 错误:nginx:504 Gateway Time out
- Cocos2dx 3.0 lambda表达式的使用
- notepad 使用技巧大全
- 如何在PADS2005去掉过孔阻焊
- OpenCV:Log_Polar极坐标变换
- RStudio+Markdown+Pandoc的中文配置
- C# DataGridView分页功能的实现
- 黑马程序员__初识Java
- LeetCode66——Plus One