From 226abc80f8b559a5e229d0c435aeed89463fc1be Mon Sep 17 00:00:00 2001 From: Thomas Beermann Date: Thu, 26 Mar 2020 11:51:47 +0100 Subject: [PATCH] add mpm event mode for webui & make proxy scheme configurable --- ui/00-mpm.conf.j2 | 4 +++- ui/httpd.conf.j2 | 38 +++++++++++++++++++++++++------------- ui/rucio.conf.j2 | 8 ++++---- 3 files changed, 32 insertions(+), 18 deletions(-) diff --git a/ui/00-mpm.conf.j2 b/ui/00-mpm.conf.j2 index 0364540..9661866 100644 --- a/ui/00-mpm.conf.j2 +++ b/ui/00-mpm.conf.j2 @@ -1,5 +1,7 @@ {% if RUCIO_HTTPD_MPM_MODE is defined and RUCIO_HTTPD_MPM_MODE == "prefork" -%} LoadModule mpm_prefork_module modules/mod_mpm_prefork.so -{% else -%} +{% elif RUCIO_HTTPD_MPM_MODE is defined and RUCIO_HTTPD_MPM_MODE == "worker" -%} LoadModule mpm_worker_module modules/mod_mpm_worker.so +{% else -%} +LoadModule mpm_event_module modules/mod_mpm_event.so {% endif %} diff --git a/ui/httpd.conf.j2 b/ui/httpd.conf.j2 index 5af5064..847d3e6 100644 --- a/ui/httpd.conf.j2 +++ b/ui/httpd.conf.j2 @@ -70,17 +70,29 @@ EnableSendfile on IncludeOptional conf.d/*.conf {% if RUCIO_HTTPD_MPM_MODE is defined and RUCIO_HTTPD_MPM_MODE == "prefork" -%} -StartServers {{ RUCIO_HTTPD_START_SERVERS | default('8') }} -MinSpareServers {{ RUCIO_HTTPD_MIN_SPARE_SERVERS | default('5') }} -MaxSpareServers {{ RUCIO_HTTPD_MAX_SPARE_SERVERS | default('20') }} -ServerLimit {{ RUCIO_HTTPD_SERVER_LIMIT | default('256') }} -MaxClients {{ RUCIO_HTTPD_MAX_CLIENTS | default('256') }} -MaxRequestsPerChild {{ RUCIO_HTTPD_MAX_REQUESTS_PER_CHILD | default('4000') }} +StartServers {{ RUCIO_HTTPD_START_SERVERS | default('8') }} +MinSpareServers {{ RUCIO_HTTPD_MIN_SPARE_SERVERS | default('5') }} +MaxSpareServers {{ RUCIO_HTTPD_MAX_SPARE_SERVERS | default('20') }} +ServerLimit {{ RUCIO_HTTPD_SERVER_LIMIT | default('256') }} +MaxClients {{ RUCIO_HTTPD_MAX_CLIENTS | default('256') }} +MaxRequestsPerChild {{ RUCIO_HTTPD_MAX_REQUESTS_PER_CHILD | default('4000') }} +{% elif RUCIO_HTTPD_MPM_MODE is defined and RUCIO_HTTPD_MPM_MODE == "worker" -%} +StartServers {{ RUCIO_HTTPD_START_SERVERS | default('1') }} +MaxClients {{ RUCIO_HTTPD_MAX_CLIENTS | default('20') }} +MinSpareThreads {{ RUCIO_HTTPD_MIN_SPARE_THREADS | default('1') }} +MaxSpareThreads {{ RUCIO_HTTPD_MAX_SPARE_THREADS | default('20') }} +ThreadsPerChild {{ RUCIO_HTTPD_THREADS_PER_CHILD | default('5') }} +MaxRequestsPerChild {{ RUCIO_HTTPD_MAX_REQUESTS_PER_CHILD | default('8192') }} {% else %} -StartServers {{ RUCIO_HTTPD_START_SERVERS | default('1') }} -MaxClients {{ RUCIO_HTTPD_MAX_CLIENTS | default('20') }} -MinSpareThreads {{ RUCIO_HTTPD_MIN_SPARE_THREADS | default('1') }} -MaxSpareThreads {{ RUCIO_HTTPD_MAX_SPARE_THREADS | default('20') }} -ThreadsPerChild {{ RUCIO_HTTPD_THREADS_PER_CHILD | default('5') }} -MaxRequestsPerChild {{ RUCIO_HTTPD_MAX_REQUESTS_PER_CHILD | default('8192') }} -{% endif %} +KeepAlive {{ RUCIO_HTTPD_KEEP_ALIVE | default('On') }} +KeepAliveTimeout {{ RUCIO_HTTPD_KEEP_ALIVE_TIMEOUT | default('5') }} +MaxKeepAliveRequests {{ RUCIO_HTTPD_MAX_KEEP_ALIVE_REQUESTS | default('128') }} +ServerLimit {{ RUCIO_HTTPD_SERVER_LIMIT | default('10') }} +StartServers {{ RUCIO_HTTPD_START_SERVERS | default('4') }} +ThreadLimit {{ RUCIO_HTTPD_THREADS_LIMIT | default('128') }} +ThreadsPerChild {{ RUCIO_HTTPD_THREADS_PER_CHILD | default('128') }} +MinSpareThreads {{ RUCIO_HTTPD_MIN_SPARE_THREADS | default('256') }} +MaxSpareThreads {{ RUCIO_HTTPD_MAX_SPARE_THREADS | default('512') }} +MaxRequestWorkers {{ RUCIO_HTTPD_MAX_REQUEST_WORKERS | default('1280') }} +MaxConnectionsPerChild {{ RUCIO_HTTPD_MAX_CONNECTIONS_PER_CHILD | default('2048') }} +{% endif %} \ No newline at end of file diff --git a/ui/rucio.conf.j2 b/ui/rucio.conf.j2 index 7b639bc..9d249c9 100644 --- a/ui/rucio.conf.j2 +++ b/ui/rucio.conf.j2 @@ -74,11 +74,11 @@ CacheRoot /tmp WSGIScriptAlias / /usr/lib/python2.7/site-packages/rucio/web/ui/main.py {% if RUCIO_PROXY is defined %} - ProxyPass /proxy https://{{ RUCIO_PROXY }} - ProxyPassReverse /proxy https://{{ RUCIO_PROXY }} + ProxyPass /proxy {{ RUCIO_PROXY_SCHEME | default('https') }}://{{ RUCIO_PROXY }} + ProxyPassReverse /proxy {{ RUCIO_PROXY_SCHEME | default('https') }}://{{ RUCIO_PROXY }} {% endif %} {% if RUCIO_AUTH_PROXY is defined %} - ProxyPass /authproxy https://{{ RUCIO_AUTH_PROXY }} - ProxyPassReverse /authproxy https://{{ RUCIO_AUTH_PROXY }} + ProxyPass /authproxy {{ RUCIO_AUTH_PROXY_SCHEME | default('https') }}://{{ RUCIO_AUTH_PROXY }} + ProxyPassReverse /authproxy {{ RUCIO_AUTH_PROXY_SCHEME | default('https') }}://{{ RUCIO_AUTH_PROXY }} {% endif %}