diff --git a/main/config_default/httpd-idds-443-py39-cc7.conf b/main/config_default/httpd-idds-443-py39-cc7.conf index 8d440270..4922fa16 100644 --- a/main/config_default/httpd-idds-443-py39-cc7.conf +++ b/main/config_default/httpd-idds-443-py39-cc7.conf @@ -8,6 +8,7 @@ TimeOut 600 KeepAliveTimeout 600 +SSLSessionCacheTimeout 600 # Built-in modules LoadModule ssl_module /usr/lib64/httpd/modules/mod_ssl.so @@ -25,11 +26,29 @@ LoadModule gridsite_module /usr/lib64/httpd/modules/mod_gridsite.so # #LoadModule wsgi_module /usr/lib64/httpd/modules/mod_wsgi.so LoadModule wsgi_module /opt/idds/lib/python3.9/site-packages/mod_wsgi/server/mod_wsgi-py39.cpython-39-x86_64-linux-gnu.so + +StartServers ${IDDS_SERVER_CONF_MIN_WORKERS} +MinSpareServers ${IDDS_SERVER_CONF_MIN_WORKERS} +ServerLimit ${IDDS_SERVER_CONF_MAX_WORKERS} +MaxSpareServers ${IDDS_SERVER_CONF_MAX_WORKERS} +MaxClients ${IDDS_SERVER_CONF_MAX_WORKERS} +MaxRequestsPerChild 2000 + + + +StartServers ${IDDS_SERVER_CONF_MIN_WORKERS} +MinSpareThreads ${IDDS_SERVER_CONF_MIN_WORKERS} +ServerLimit ${IDDS_SERVER_CONF_MAX_WORKERS} +MaxSpareThreads ${IDDS_SERVER_CONF_MAX_WORKERS} +MaxRequestWorkers ${IDDS_SERVER_CONF_MAX_WORKERS} +MaxConnectionsPerChild 2000 + + WSGIPythonHome /opt/idds WSGIPythonPath /opt/idds/lib/python3.9/site-packages - WSGIDaemonProcess idds_daemon processes=25 threads=2 request-timeout=600 queue-timeout=600 python-home=/opt/idds python-path=/opt/idds/lib/python3.9/site-packages python-path=/opt/idds python-path=/opt/idds/lib/python3.9/site-packages + WSGIDaemonProcess idds_daemon processes=${IDDS_SERVER_CONF_NUM_WSGI} threads=2 request-timeout=600 queue-timeout=600 python-home=/opt/idds python-path=/opt/idds/lib/python3.9/site-packages python-path=/opt/idds python-path=/opt/idds/lib/python3.9/site-packages WSGIProcessGroup idds_daemon WSGIApplicationGroup %GLOBAL WSGIScriptAlias /idds /opt/idds/bin/idds.wsgi diff --git a/start-daemon.sh b/start-daemon.sh index 31865f51..cadc96b6 100755 --- a/start-daemon.sh +++ b/start-daemon.sh @@ -179,6 +179,21 @@ if [ ! -z "$IDDS_PRINT_CFG" ]; then echo "" fi +# min number of workers +if [[ -z "${IDDS_SERVER_CONF_MIN_WORKERS}" ]]; then + export IDDS_SERVER_CONF_MIN_WORKERS=25 +fi + +# max number of workers +if [[ -z "${IDDS_SERVER_CONF_MAX_WORKERS}" ]]; then + export IDDS_SERVER_CONF_MAX_WORKERS=512 +fi + +# max number of WSGI daemons +if [[ -z "${IDDS_SERVER_CONF_NUM_WSGI}" ]]; then + export IDDS_SERVER_CONF_NUM_WSGI=25 +fi + # create database if not exists python /opt/idds/tools/env/create_database.py # upgrade database