uWSGI http-timeout option
Adds a value for http-timeout for drydock, in support of the long sync /validatedesign invocation without disconnecting the client. Change-Id: I482dec7092ca4204accf13913621c7b2e16eeaf9
This commit is contained in:
parent
1804203ea1
commit
24e8bd1a3a
@ -7,6 +7,8 @@ PORT=${PORT:-9000}
|
|||||||
DRYDOCK_API_WORKERS=${DRYDOCK_API_WORKERS:-"1"}
|
DRYDOCK_API_WORKERS=${DRYDOCK_API_WORKERS:-"1"}
|
||||||
# Threads per worker
|
# Threads per worker
|
||||||
DRYDOCK_API_THREADS=${DRYDOCK_API_THREADS:-"4"}
|
DRYDOCK_API_THREADS=${DRYDOCK_API_THREADS:-"4"}
|
||||||
|
# HTTP timeout
|
||||||
|
HTTP_TIMEOUT=${HTTP_TIMEOUT:-"600"}
|
||||||
|
|
||||||
if [ "$1" = 'server' ]; then
|
if [ "$1" = 'server' ]; then
|
||||||
# Run Drydock under uWSGI
|
# Run Drydock under uWSGI
|
||||||
@ -17,7 +19,8 @@ if [ "$1" = 'server' ]; then
|
|||||||
# --pyargs - Provide some command line arguments to the Python executable
|
# --pyargs - Provide some command line arguments to the Python executable
|
||||||
# --threads - Number of threads each uWSGI worker should use for handling requests
|
# --threads - Number of threads each uWSGI worker should use for handling requests
|
||||||
# --workers - Number of uWSGI workers/processes for handling requests
|
# --workers - Number of uWSGI workers/processes for handling requests
|
||||||
exec uwsgi --http :${PORT} --paste config:/etc/drydock/api-paste.ini --enable-threads -L --pyargv "--config-file /etc/drydock/drydock.conf" --threads $DRYDOCK_API_THREADS --workers $DRYDOCK_API_WORKERS
|
# --http-timeout - How long uWSGI will proxy the python code processing before disconnecting a client
|
||||||
|
exec uwsgi --http :${PORT} --paste config:/etc/drydock/api-paste.ini --enable-threads -L --pyargv "--config-file /etc/drydock/drydock.conf" --threads $DRYDOCK_API_THREADS --workers $DRYDOCK_API_WORKERS --http-timeout $HTTP_TIMEOUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec ${CMD} $@
|
exec ${CMD} $@
|
||||||
|
Loading…
Reference in New Issue
Block a user