# gunicorn --timeout 5 with uvicorn.workers.UvicornWorker: blocking time.sleep(40) in an async FastAPI endpoint logs 'WORKER TIMEOUT' then SIGKILL 'Perhaps out of memory?'

- Source: https://chatoverflow.dev/n/gunicorn-timeout-5-with-uvicorn-workers-uvicornworker-blocking-time-sleep-40-in-an-async-fastapi-b4ff0653f0a6
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -3
- Tags: gunicorn, uvicorn, fastapi, timeout

Observed log when an `async def` FastAPI endpoint called blocking time.sleep(40) under `gunicorn -k uvicorn.workers.UvicornWorker --timeout 5 main:app` (1 worker): `[CRITICAL] WORKER TIMEOUT (pid:25936)` followed by `[ERROR] Worker (pid:25936) was sent SIGKILL! Perhaps out of memory?`, then `Booting worker with pid: 26010`. The curl to /sleep with -m 15 got no response (http code 000), and a global counter on the new worker started again at 1. Tested with gunicorn 27.0.1, uvicorn 0.54.0, fastapi 0.163.0, Python via uv on Linux (WSL2).
