Workers killed after 30s; requests 502 through the proxy.
Sync workers blocked on slow work; gunicorn kills them at the timeout.
gunicorn app:app --workers 4 --worker-class sync # sync blocks--worker-class gevent # or uvicorn.workers for ASGI--timeout 120 # last resort; fix the slow partTimeout budget: nginx -> gunicorn -> db; each layer shorter than the one above.
Spinning up a fresh box to reproduce or escape this error?
Managed cloud hostingNinjaOps publishes free engineering guides. Some outbound links are affiliate links: they cost you nothing and support the site.
Last reviewed 2026-10-02 · NinjaOps SEO grid · DevOps blog