Skip to content

Commit

Permalink
chg: [config] set number of workers to 49 with reuse-port
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricbonhomme committed Nov 19, 2024
1 parent aead921 commit 3068268
Show file tree
Hide file tree
Showing 3 changed files with 160 additions and 4 deletions.
7 changes: 5 additions & 2 deletions bin/start_website.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@ def _launch_website(self) -> Popen: # type: ignore[type-arg]
website_dir = get_homedir() / 'website'
ip = get_config('generic', 'website_listen_ip')
port = get_config('generic', 'website_listen_port')
return Popen(['gunicorn', '-w', '10',
'--graceful-timeout', '2', '--timeout', '300',
return Popen(['gunicorn', '-w', '49',
'--worker-class', 'gevent',
'--graceful-timeout', '2',
'--timeout', '300',
'-b', f'{ip}:{port}',
'--log-level', 'info',
'--reuse-port',
'app'],
cwd=website_dir)

Expand Down
155 changes: 154 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ python = "^3.10"
redis = {version = "^5.0.8", extras = ["hiredis"]}
flask-restx = "^1.3.0"
werkzeug = "^3.0.4"
gunicorn = "^23.0.0"
gunicorn = {version = "^23.0.0", extras = ["gevent"]}
requests = "^2.32.3"
gitpython = "^3.1.43"
bootstrap-flask = "^2.4.0"
Expand Down

0 comments on commit 3068268

Please sign in to comment.