Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ENV config options for uWSGI limits #309

Merged
merged 1 commit into from
Oct 18, 2021

Conversation

w4tsn
Copy link
Contributor

@w4tsn w4tsn commented Jun 10, 2021

It is handy to be able to set uWSGI parameters via ENV in a container
context, especially because those limits are highly dependant on the
use-case so setting them is a reasonably common case.

I've added the listen configuration option with a default of 256. The
uWSGI default is 100 I think, which is quite low for setups with more
serious load. A modern kernel / OS usually is configured for 1024
concurrent connections (aka open file descriptors) so 256 should not be
too bad. In production I actually use 512 to cope with the load,
otherwise I get 502 resource unavailable errors, but that just as a
side-note.

I've kept the limits in the uWSGI config file and added the listen
option there too in case a setup uses a custom supervisord.conf but the
container packaged uwsgi.ini.

It is handy to be able to set uWSGI parameters via ENV in a container
context, especially because those limits are highly dependant on the
use-case so setting them is a reasonably common case.

I've added the listen configuration option with a default of 256. The
uWSGI default is 100 I think, which is quite low for setups with more
serious load. A modern kernel / OS usually is configured for 1024
concurrent connections (aka open file descriptors) so 256 should not be
too bad. In production I actually use 512 to cope with the load,
otherwise I get 502 resource unavailable errors, but that just as a
side-note.

I've kept the limits in the uWSGI config file and added the listen
option there too in case a setup uses a custom supervisord.conf but the
container packaged uwsgi.ini.
@satterly
Copy link
Member

Thanks a lot. 👍

@satterly satterly merged commit 2f80fa0 into alerta:master Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants