1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-01 16:36:06 +00:00

build(docker): gunicorn runs 4 workers in the image

gunicorn.conf.py starts 2 x CPUs + 1 workers, at most 8, about 140 MB
each: 1.1 GB on the deployed host for a panel. The image now runs 4,
which still sends up to 8 requests at a time to one compute and leaves
threads for the others when one hangs. GUNICORN_CMD_ARGS in
docker-compose.override.yml sets another number; installs outside
Docker keep their default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kk4h2TcUiaWmU5MUszYSea
This commit is contained in:
catborise 2026-11-08 16:02:13 +03:00
parent 80a66dc8b5
commit 6e3d376eef
2 changed files with 4 additions and 1 deletions

View file

@ -369,7 +369,7 @@ services:
The container makes the file the panel user's (uid 33) with mode 600; edit it as root.
gunicorn runs at most 8 workers (fewer on hosts with under 4 CPUs) of 4 threads each; to change it, set `GUNICORN_CMD_ARGS=--workers N` in a drop-in of `webvirt-cloud` (`systemctl edit webvirt-cloud`: `[Service]` and `Environment="GUNICORN_CMD_ARGS=--workers N"`) or in `docker-compose.override.yml`.
gunicorn runs at most 8 workers (fewer on hosts with under 4 CPUs), in Docker 4, of 4 threads each; each worker takes about 140 MB and sends at most 2 requests at a time to one compute. To change it, set `GUNICORN_CMD_ARGS=--workers N` in a drop-in of `webvirt-cloud` (`systemctl edit webvirt-cloud`: `[Service]` and `Environment="GUNICORN_CMD_ARGS=--workers N"`) or in `docker-compose.override.yml`.
### HTTPS and reverse proxy