Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add uwsgi http-keepalive and http-timeout flags #338

Merged
merged 15 commits into from
Oct 13, 2020
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions run_app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ if [ "$WEB_SERVER_TYPE" = "gunicorn-async" ]; then
elif [ "$WEB_SERVER_TYPE" = "gunicorn-threads" ]; then
run_command="gunicorn application:application --worker-class gthread"
elif [ "$WEB_SERVER_TYPE" = "uwsgi" ]; then
run_command="uwsgi uwsgi.ini --workers ${WEB_SERVER_WORKERS}"
run_command="uwsgi uwsgi.ini --workers ${WEB_SERVER_WORKERS} --http-keepalive=${HTTP_KEEP_ALIVE}"
elif [ "$WEB_SERVER_TYPE" = "uwsgi-threads" ]; then
run_command="uwsgi uwsgi.ini --workers ${WEB_SERVER_WORKERS} --enable-threads --threads ${WEB_SERVER_THREADS}"
run_command="uwsgi uwsgi.ini --workers ${WEB_SERVER_WORKERS} --enable-threads --threads ${WEB_SERVER_THREADS} --http-keepalive=${HTTP_KEEP_ALIVE}"
elif [ "$WEB_SERVER_TYPE" = "uwsgi-async" ]; then
run_command="uwsgi uwsgi.ini --module patched:application --workers ${WEB_SERVER_WORKERS} --single-interpreter --gevent ${WEB_SERVER_UWSGI_ASYNC_CORES}"
run_command="uwsgi uwsgi.ini --module patched:application --workers ${WEB_SERVER_WORKERS} --gevent ${WEB_SERVER_UWSGI_ASYNC_CORES}"
ajmaddaford marked this conversation as resolved.
Show resolved Hide resolved
fi

if [ "$EQ_NEW_RELIC_ENABLED" = "True" ]; then
Expand Down
5 changes: 4 additions & 1 deletion uwsgi.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
[uwsgi]
http = :5000
http-timeout = 35
http-connect-timeout = 5
module = application:application
buffer-size = 32768

strict = true
master = true
need-app = true
single-interpreter = true
MebinAbraham marked this conversation as resolved.
Show resolved Hide resolved

disable-logging = true
log-4xx = true
log-5xx = true
log-5xx = true