puppet: Make uwsgi listen backlog limit configurable.

This can be useful for busy servers to limit the risk of bursts of
traffic causing them to reject requests.
This commit is contained in:
Tim Abbott 2019-05-17 12:38:34 -07:00
parent 3daa4fa64d
commit cd1ec37404
2 changed files with 2 additions and 0 deletions

View File

@ -89,6 +89,7 @@ class zulip::app_frontend_base {
notify => Service[$zulip::common::supervisor_service], notify => Service[$zulip::common::supervisor_service],
} }
$uwsgi_listen_backlog_limit = zulipconf('application_server', 'uwsgi_listen_backlog_limit', 128)
$uwsgi_buffer_size = zulipconf('application_server', 'uwsgi_buffer_size', 8192) $uwsgi_buffer_size = zulipconf('application_server', 'uwsgi_buffer_size', 8192)
$uwsgi_processes = zulipconf('application_server', 'uwsgi_processes', $uwsgi_default_processes) $uwsgi_processes = zulipconf('application_server', 'uwsgi_processes', $uwsgi_default_processes)
file { '/etc/zulip/uwsgi.ini': file { '/etc/zulip/uwsgi.ini':

View File

@ -8,6 +8,7 @@ chown-socket=zulip:zulip
processes=<%= @uwsgi_processes %> processes=<%= @uwsgi_processes %>
harakiri=20 harakiri=20
buffer-size=<%= @uwsgi_buffer_size %> buffer-size=<%= @uwsgi_buffer_size %>
listen=<%= @uwsgi_listen_backlog_limit %>
post-buffering=4096 post-buffering=4096
env= LANG=en_US.UTF-8 env= LANG=en_US.UTF-8
uid=zulip uid=zulip