uwsgi invalid request block size

后端 未结 7 1304
陌清茗
陌清茗 2020-12-12 11:09

I\'m running uwsgi in emperor mode

uwsgi --emperor /path/to/vassals/ --buffer-size=32768

and getting this error

invalid re         


        
7条回答
  •  爱一瞬间的悲伤
    2020-12-12 11:38

    The correct solution is not to switch to HTTP protocol. You just need to increase the buffer size in uWSGI settings.

    buffer-size=32768
    

    or in commandline mode:

    -b 32768
    

    Quote from official documentation:

    By default uWSGI allocates a very small buffer (4096 bytes) for the headers of each request. If you start receiving “invalid request block size” in your logs, it could mean you need a bigger buffer. Increase it (up to 65535) with the buffer-size option.

    If you receive ‘21573’ as the request block size in your logs, it could mean you are using the HTTP protocol to speak with an instance speaking the uwsgi protocol. Don’t do this.

    From here: https://uwsgi-docs.readthedocs.io/en/latest/ThingsToKnow.html

提交回复
热议问题