Skip to content

Add Optional Variable GUNICORN_NUM_WORKERS#74

Open
Nehoko wants to merge 2 commits intogramps-project:mainfrom
Nehoko:patch-1
Open

Add Optional Variable GUNICORN_NUM_WORKERS#74
Nehoko wants to merge 2 commits intogramps-project:mainfrom
Nehoko:patch-1

Conversation

@Nehoko
Copy link
Copy Markdown

@Nehoko Nehoko commented Apr 8, 2026

Add optional GUNICORN_NUM_WORKERS environment variable

This PR introduces support for an optional environment variable GUNICORN_NUM_WORKERS for the grampsweb service.

Motivation

By default, Gunicorn runs with 8 workers, which may reach the resources limit. Allowing users to configure the number of workers enables better utilization of available CPU resources and improves request handling throughput.

Changes

  • Added support for GUNICORN_NUM_WORKERS environment variable
  • Documented it as optional in the docker-compose configuration

Optional variable GUNICORN_NUM_WORKERS added with comments
GRAMPSWEB_CELERY_CONFIG__broker_url: "redis://grampsweb_redis:6379/0"
GRAMPSWEB_CELERY_CONFIG__result_backend: "redis://grampsweb_redis:6379/0"
GRAMPSWEB_RATELIMIT_STORAGE_URI: redis://grampsweb_redis:6379/1
# GUNICORN_NUM_WORKERS: 8 # optional variable, each worker increase efficiency, but takes resources (CPU and RAM)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"increases" :)

@Nehoko Nehoko requested a review from DavidMStraub April 8, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants