How to set uWSGI buffer size in mailman3 with Dcoker
Running into an issue where users are getting a 502 bade gateway and we traced it down to the headers that are getting sent when they request web pages. This looks like our issue
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.
So any idea on how to set this in mailman3 running in the maxking docker environment?
Running into an issue where users are getting a 502 bade gateway and we traced it down to the headers that are getting sent when they request web pages. This looks like our issue
By default, uWSGI allocates a very small buffer (4096 bytes) for the
On 9/1/22 23:15, bob B via Mailman-users wrote: 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.
So any idea on how to set this in mailman3 running in the maxking docker environment?
You can open a pull request to the Github Repo to modify the uwsgi configs1. I think the config name is "buffer-size" from the documentation2.
-- thanks, Abhilash Raj (maxking)
I just submitted a pull request, although I set it to the max of "buffer-size = 65535" which is the max, which is pretty aggressive, and you might want to shrink that??? but it did correct our 502 errors. As a workaround/ temp solution/testing, I just made a copy of the file outside the container and added my change then pointed to it in the .yaml file....pretty cool to mount a file outside the container over a file inside the container.
I.e.
- /docker-mailman/custom_container_files/uwsgi.ini:/opt/mailman-web/uwsgi.ini
participants (2)
-
Abhilash Raj
-
bob B