Skip to content

Commit

Permalink
Merge pull request #278 from HSF/dev
Browse files Browse the repository at this point in the history
add more idds http threads
  • Loading branch information
wguanicedew authored Jan 31, 2024
2 parents 302f2cf + 0979067 commit 534d773
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
21 changes: 20 additions & 1 deletion main/config_default/httpd-idds-443-py39-cc7.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

TimeOut 600
KeepAliveTimeout 600
SSLSessionCacheTimeout 600

# Built-in modules
LoadModule ssl_module /usr/lib64/httpd/modules/mod_ssl.so
Expand All @@ -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

<IfModule prefork.c>
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
</IfModule>

<IfModule mpm_event_module>
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
</IfModule>

WSGIPythonHome /opt/idds
WSGIPythonPath /opt/idds/lib/python3.9/site-packages

<IfModule mod_wsgi.c>
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
Expand Down
15 changes: 15 additions & 0 deletions start-daemon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 534d773

Please sign in to comment.