-
-
Notifications
You must be signed in to change notification settings - Fork 369
Add configurable timeout for gunicorn workers #50
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for the PR.
src/config/gunicorn.py
Outdated
|
||
reload = bool(strtobool(os.getenv("WEB_RELOAD", "false"))) | ||
|
||
timeout = int(os.getenv("GUNICORN_TIMEOUT", 120)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you rename this to WEB_TIMEOUT
?
.env.example
Outdated
#export WEB_RELOAD=false | ||
export WEB_RELOAD=true | ||
|
||
# GUNICORN_TIMEOUT sets the timeout for gunicorn workers, defaults to 120 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Configure the timeout value in seconds for gunicorn.
.env.example
Outdated
# seconds. | ||
#export GUNICORN_TIMEOUT= | ||
# Configure the timeout value in seconds for gunicorn. | ||
#export WEB_TIMEOUT= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given it defaults to 120, can you also set #export WEB_TIMEOUT=120
here so folks know what the default value is? Currently it's missing the 120 value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing.
Looks good, can you roll up the commits to a single one with a message of "Add configurable gunicorn timeout value"? |
a3e1e0e
to
adce3df
Compare
Done, I have rolled up the commits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks a lot for the PR.
I added
timeout
setting to gunicorn config which is configurable via environment variable.