mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-11 12:46:49 +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:
parent
80a66dc8b5
commit
6e3d376eef
2 changed files with 4 additions and 1 deletions
|
|
@ -44,6 +44,9 @@ RUN --mount=type=cache,target=/root/.cache/pip \
|
|||
|
||||
FROM base
|
||||
|
||||
# 4 gunicorn workers of 4 threads (about 140 MB each); docker-compose.override.yml can set another number
|
||||
ENV GUNICORN_CMD_ARGS="--workers 4"
|
||||
|
||||
COPY --from=build /srv/webvirtcloud/venv venv
|
||||
COPY . .
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue