diff options
author | Frederick Muriuki Muriithi | 2024-07-23 14:44:30 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-07-23 14:44:30 -0500 |
commit | 39c1bfae9d282b82c729a21718e9a964d93b4574 (patch) | |
tree | f43c994cf0c2c1046ea3a33b5d9cf52462d1e25e | |
parent | cffe5bcd45edbd5113a687e7f5d3f24b298fd813 (diff) | |
download | genenetwork2-39c1bfae9d282b82c729a21718e9a964d93b4574.tar.gz |
Run GN2 multithreaded by default
The service runs multithreaded on production, thus running it
multithreaded during dev should help with exposing otherwise
difficult/impossible to debug issues if running single-threaded.
-rwxr-xr-x | bin/genenetwork2 | 2 | ||||
-rw-r--r-- | gn2/runserver.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/bin/genenetwork2 b/bin/genenetwork2 index fc14eedc..f5d6b055 100755 --- a/bin/genenetwork2 +++ b/bin/genenetwork2 @@ -186,7 +186,7 @@ fi if [ "$1" = '-gunicorn-dev' ] ; then echo PYTHONPATH="${PYTHONPATH}" if [ -z "${SERVER_PORT}" ]; then echo "ERROR: Provide a SERVER_PORT" ; exit 1 ; fi - cmd="--bind 0.0.0.0:$SERVER_PORT --workers=1 --timeout 180 --reload ${GUNICORN_EXTRA_ARGS} gn2.run_gunicorn:app" + cmd="--bind 0.0.0.0:$SERVER_PORT --workers=3 --timeout 180 --reload ${GUNICORN_EXTRA_ARGS} gn2.run_gunicorn:app" echo "RUNNING gunicorn ${cmd}" gunicorn $cmd exit $? diff --git a/gn2/runserver.py b/gn2/runserver.py index 0c95f715..dd176752 100644 --- a/gn2/runserver.py +++ b/gn2/runserver.py @@ -28,7 +28,7 @@ if WEBSERVER_MODE == 'DEBUG': port=SERVER_PORT, debug=True, use_debugger=False, - threaded=False, + threaded=True, processes=0, use_reloader=True) elif WEBSERVER_MODE == 'DEV': @@ -37,7 +37,7 @@ elif WEBSERVER_MODE == 'DEV': port=SERVER_PORT, debug=False, use_debugger=False, - threaded=False, + threaded=True, processes=0, use_reloader=True) else: # staging/production modes |