502 Bad Gateway django nginx + gunicorn

问题描述 投票:0回答:1

我正在使用post请求从用户输入(textarea)加载大量数据到数据库(18k lines)我得到502 Bad Gateway错误

当我打印sudo nano /var/log/nginx/error.log我得到这个:

2018/09/06 10:21:04 [alert] 19688#19688: *3 open socket #22 left in connection 4
2018/09/06 10:21:04 [alert] 19688#19688: aborting
2018/09/06 11:04:32 [error] 20076#20076: *14 upstream prematurely closed connection while reading response header from upstream, client: 95.1$

这只在我的生产服务器(nginx + gunicorn + postgres)上,在我的开发服务器上它运行良好。

我该怎么办?

我也有

django nginx gunicorn
1个回答
0
投票

gunicorn的超时时间延长有助于解决这个问题

© www.soinside.com 2019 - 2024. All rights reserved.