nginx + flask + gunicorn 报错 upstream prematurely closed

*20264 upstream prematurely closed connection while reading response header from upstream, client: 222.82.177.81, server: dashapi.im.izdax.cn, request: "POST /api/dash/skins HTTP/2.0", upstream: "http://127.0.0.1:5558/api/dash/skins", host: "dashapi.im.izdax.cn", referrer: "https://dash.im.izdax.cn/"

在上传文件时nginx 报这个错误,一直以为时nginx的来凝结超时,后来发现,时间上是 gunicorn的问题,
加上 timeout = 600参数后好了

gunicorn 'app:dash()' -b ip:port --timeout=600

posted @ 2021-03-15 18:49  ShanCe-刘勇  阅读(316)  评论(0编辑  收藏  举报