tiangolo / uvicorn-gunicorn-fastapi-docker

Docker image with Uvicorn managed by Gunicorn for high-performance FastAPI web applications in Python with performance auto-tuning.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[1] [CRITICAL] WORKER TIMEOUT (pid:45)

dtMndas opened this issue · comments

commented

i post many requests to the server, the gunicorn worker will raise the error "[CRITICAL] WORKER TIMEOUT (pid:45)". and it can not deal with the last request before restart。so the last request which this error worker get before restart will has not any response. please help me how to solve this error @tiangolo ,Thanks

my gunicorn config is :
bind = "0.0.0.0:7075"
worker=13
worker_connections = 1000
keepalive = 20
daemon = False
timeout = 120
preload_app = True
max_requests_jitter = 1024
worker_class = "uvicorn.workers.UvicornWorker"
max_requests = 2048
graceful_timeout = 120
errorlog = "/logs/gunicorn_error.log"

Assuming the original issue was solved, it will be automatically closed now. But feel free to add more comments or create new issues.

This solution does not seem plausible for stability. This seems like an issue with how gunicorn +/ uvicorn are dealing with request processing, and something is allowing more requests in than it can handle correctly in their loop[s].