Skip to content

Commit

Permalink
recycle gunicorn workers (getredash#4013)
Browse files Browse the repository at this point in the history
  • Loading branch information
Omer Lachish authored and harveyrendell committed Nov 14, 2019
1 parent dc08ba2 commit 57ed300
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/docker-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ dev_worker() {
}

server() {
exec /usr/local/bin/gunicorn -b 0.0.0.0:5000 --name redash -w${REDASH_WEB_WORKERS:-4} redash.wsgi:app
# Recycle gunicorn workers every n-th request. See http://docs.gunicorn.org/en/stable/settings.html#max-requests for more details.
MAX_REQUESTS=${MAX_REQUESTS:-1000}
MAX_REQUESTS_JITTER=${MAX_REQUESTS_JITTER:-100}
exec /usr/local/bin/gunicorn -b 0.0.0.0:5000 --name redash -w${REDASH_WEB_WORKERS:-4} redash.wsgi:app --max-requests $MAX_REQUESTS --max-requests-jitter $MAX_REQUESTS_JITTER
}

create_db() {
Expand Down

0 comments on commit 57ed300

Please sign in to comment.