gpt4 book ai didi

django - 如何在gunicorn(django)+ nginx + docker中更改缓冲区大小

转载 作者:行者123 更新时间:2023-12-02 19:58:30 26 4
gpt4 key购买 nike

我的问题是,在某些请求中,应用程序获取主体大小为big(xml)并返回xml large,该请求返回502。这是随机发生的。

我认为它正在运行缓冲区溢出。

我的应用程序在wsgi之类的guinicorn中在docker中运行。而且我想将缓冲区大小的值更改为64k。我怎么做?

我的Gunicorn部署命令

python manage.py migrate && gunicorn backend.wsgi:application -b 0.0.0.0:8000 --workers 3 --log-level=info

我可能会误会,我的依据是:
Nginx uwsgi (104: Connection reset by peer) while reading response header from upstream

错误日志nginx
38286 upstream prematurely closed connection while reading response header from upstream

最佳答案

我认为这是nginx的问题,请查看client_max_body_size

关于django - 如何在gunicorn(django)+ nginx + docker中更改缓冲区大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56131839/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com