-
-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
The container doesn't listen to SIGTERM, meaning Docker [stop / restart] has to kill it forcefully after waiting 10 seconds (default timeout).
This can either be fixed by prepending the command with 'exec':
CMD exec gunicorn main:app --max-requests 3000 --max-requests-jitter 150 --workers $WORKERS --worker-class uvicorn.workers.UvicornWorker --bind 0.0.0.0:$PORT
Or using exec form (which doesn't work because of the environent variables, you'd have to set the entrypoint to a small .sh script that does the same):
CMD ["gunicorn", "main:app", ...]
See https://lucaspin.medium.com/where-is-my-sigterm-docker-ff7fd8aec757 for more info.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working