Setup WSGIDaemonProcess, ProcessGroup + ApplicationGroup for logs-dev

ARA running as a WSGI application highlighted the fact that we don't
currently fork succifient processes to handle the different calls.

In our specific context, logs.o.o's mod_wsgi is always busy because
logstash is hitting it. The default settings with the increased load
from ARA aren't able to keep up.

These values are being inspired by the puppet-openstacklib work for
their WSGI implementation [1].

[1]: http://git.openstack.org/cgit/openstack/puppet-openstacklib/tree/manifests/wsgi/apache.pp

Change-Id: If3e338f412771c178f064602081256b6abeffc28
This commit is contained in:
David Moreau Simard 2018-04-03 23:35:47 -04:00
parent 8a826a0fd4
commit 7a4e625ca1
No known key found for this signature in database
GPG Key ID: 33A07694CBB71ECC
2 changed files with 6 additions and 0 deletions

View File

@ -31,6 +31,8 @@ class openstackci::logserver (
$swift_tenant_name = '',
$swift_region_name = '',
$swift_default_container = '',
$wsgi_processes = 8,
$wsgi_threads = 1,
$readmes = {},
) {

View File

@ -13,6 +13,10 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %>
<% end -%>
DocumentRoot <%= @docroot %>
WSGIDaemonProcess logs-dev user=www-data group=www-data processes=<%= @wsgi_processes %> threads=<%= @wsgi_threads %>
WSGIProcessGroup logs-dev
WSGIApplicationGroup %{GLOBAL}
# use Apache to compress the results afterwards, to save on the wire
# it's approx 18x savings of wire traffic to compress. We need to
# compress by content types that htmlify can produce