Add ENV config options for uWSGI limits #309
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.