以前从未出过问题,今天就不停的502 badgateway, 环境是nginx+django+uwsgi, django 版本1.11, uwsgi 2.0; 具体表现是nginx 502 badgateway, 但是django是可以收到消息的,但是无法返回, uwsgi 没有找到access的记录;
nginx报错为
upstream prematurely closed connection while reading response header from upstream, client: ip, server: ip, request: "POST url HTTP/1.1", upstream: "uwsgi://127.0.0.1:18001", host: "ip:19020"
改nginx 的timeout是没有作用的
nginx上游出错主动断开连接,可以看到是uwsgi的问题,uwsgi重启就ok了,可能是uwsgi的问题,是起了太多的项目了么,回头好好看一看uwsgi的配置教学,可能是配置出错了.
原文:https://www.cnblogs.com/mangmangbiluo/p/11443784.html