Skip to content

Commit

Permalink
Merge pull request #931 from thunderstore-io/gunicorn-config
Browse files Browse the repository at this point in the history
Add GUNICORN_WORKER_CONNECTIONS config option
  • Loading branch information
MythicManiac authored Dec 6, 2023
2 parents 7367421 + adf8ef1 commit 31405a1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions django/docker_entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ def to_bool(val) -> bool:
GUNICORN_WORKER_CLASS = register_variable(str, "GUNICORN_WORKER_CLASS", "gevent")
GUNICORN_WORKER_COUNT = register_variable(int, "GUNICORN_WORKER_COUNT", 3)
GUNICORN_WORKER_TIMEOUT = register_variable(int, "GUNICORN_WORKER_TIMEOUT", 30)
GUNICORN_WORKER_CONNECTIONS = register_variable(
int, "GUNICORN_WORKER_CONNECTIONS", 1000
)
GUNICORN_LOG_LEVEL = register_variable(str, "GUNICORN_LOG_LEVEL", "info")
GUNICORN_MAX_REQUESTS = register_variable(int, "GUNICORN_MAX_REQUESTS", 10000)
GUNICORN_MAX_REQUESTS_JITTER = register_variable(
Expand Down Expand Up @@ -121,6 +124,8 @@ def run_gunicorn() -> None:
GUNICORN_MAX_REQUESTS,
"--max-requests-jitter",
GUNICORN_MAX_REQUESTS_JITTER,
"--worker-connections",
GUNICORN_WORKER_CONNECTIONS,
"-w",
GUNICORN_WORKER_COUNT,
"-t",
Expand Down

0 comments on commit 31405a1

Please sign in to comment.