Skip to content

Conversation

@alhendrickson
Copy link
Collaborator

@alhendrickson alhendrickson commented Oct 28, 2025

New behaviour

Usage

Given this env var in the yaml

    environment:
      - SERVER_GUNICORN_EXTRA_ARGS=--worker-connections 1 --backlog 5

See this log line

cogstack-medcat-service-production  | Starting up the service using gunicorn server ...
cogstack-medcat-service-production  | + exec gunicorn --bind 0.0.0.0:5000 --workers=1 --threads=1 --timeout=300 '--access-logformat=%(t)s [ACCESS] %(h)s "%(r)s" %(s)s "%(f)s" "%(a)s"' --access-logfile=- --error-logfile=- --log-level info --config /cat/config.py --max-requests=1000 --max-requests-jitter=50 --worker-connections 1 --backlog 5 --worker-class uvicorn.workers.UvicornWorker medcat_service.main:app
cogstack-medcat-service-production  | [2025-10-29 09:22:43 +0000] [1] [INFO] Starting gunicorn 23.0.0

@alhendrickson alhendrickson changed the title feat(medcat-service): Add Gunicorn config for max requests and jitter feat(medcat-service): Add Gunicorn CLI args for max requests, jitter, and any other input from env Oct 29, 2025
Copy link
Collaborator

@mart-r mart-r left a comment

Choose a reason for hiding this comment

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

Looks good to me!
Getting this in without #141 makes everything else simpler!

@alhendrickson alhendrickson merged commit a83db7c into main Oct 29, 2025
11 checks passed
@alhendrickson alhendrickson deleted the feat/medcat-service/add-gunicorn-config branch October 29, 2025 11:00
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.

3 participants