From cd1ec37404baedf36c50cbcf5062e825db6c2100 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Fri, 17 May 2019 12:38:34 -0700 Subject: [PATCH] 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. --- puppet/zulip/manifests/app_frontend_base.pp | 1 + puppet/zulip/templates/uwsgi.ini.template.erb | 1 + 2 files changed, 2 insertions(+) diff --git a/puppet/zulip/manifests/app_frontend_base.pp b/puppet/zulip/manifests/app_frontend_base.pp index 2f726ec16f..b68b0a1498 100644 --- a/puppet/zulip/manifests/app_frontend_base.pp +++ b/puppet/zulip/manifests/app_frontend_base.pp @@ -89,6 +89,7 @@ class zulip::app_frontend_base { 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_processes = zulipconf('application_server', 'uwsgi_processes', $uwsgi_default_processes) file { '/etc/zulip/uwsgi.ini': diff --git a/puppet/zulip/templates/uwsgi.ini.template.erb b/puppet/zulip/templates/uwsgi.ini.template.erb index 6669795822..bda9117121 100644 --- a/puppet/zulip/templates/uwsgi.ini.template.erb +++ b/puppet/zulip/templates/uwsgi.ini.template.erb @@ -8,6 +8,7 @@ chown-socket=zulip:zulip processes=<%= @uwsgi_processes %> harakiri=20 buffer-size=<%= @uwsgi_buffer_size %> +listen=<%= @uwsgi_listen_backlog_limit %> post-buffering=4096 env= LANG=en_US.UTF-8 uid=zulip