gunicorn.worker.connections
Active connections per workerDimensions:None
Technical Annotations (46)
Configuration Parameters (11)
workersrecommended: 9worker-classrecommended: geventthreadsrecommended: 1timeoutrecommended: 60worker_connectionspool_sizerecommended: ≥ threads per worker, generally 4-8 per workermax_overflowrecommended: 1-10pool_recyclerecommended: 3600 (1 hour)pool_timeoutrecommended: 30 secondsworker_classrecommended: gevent--timeoutrecommended: 600Error Signatures (5)
sqlalchemy.exc.TimeoutError: QueuePool limit of size 5 overflow 10 reached,connection timed out, timeout 30.00exceptionconnect() failed (111: Connection refused)log pattern502http status[CRITICAL] WORKER TIMEOUTlog patternH12 Request Timeouterror codeCLI Commands (9)
gunicorn app:server --workers $WORKERS --worker-class gevent --bind 0.0.0.0:8000 --timeout 60remediationpip install gunicorn geventremediationcurl --unix-socket /run/gunicorn.sock http://diagnosticsystemctl status gunicorndiagnosticsystemctl status caddydiagnosticdmesg -T | egrep -i 'memory'diagnosticdmesg -T | egrep -i 'oom'diagnosticpg_stat_activitydiagnosticulimit -ndiagnosticTechnical References (21)
WSGIprotocolGeventcomponentDash callbackscomponentASGIprotocolEventletcomponentCelerycomponent/run/gunicorn.sockfile pathsystemd socket activationconceptgthreadcomponentkeepaliveconceptulimitconceptkeepalive timeoutconceptSNAT port exhaustionconcepthttp.disconnectcomponentasyncio.CancelledErrorexceptionasyncio.wait_forcomponentgeventcomponentuvicorncomponentgthread workercomponentself.nr_connscomponentself.worker_connectionscomponentRelated Insights (17)
Worker pool exhaustion causes exact 60-second request hangscritical
▸
Synchronous WSGI workers block on I/O preventing concurrent request handlingwarning
▸
Insufficient worker count for moderate concurrent usage causes request queueingwarning
▸
Slow backend responses cause concurrent request memory buildupwarning
▸
Gunicorn unix socket hangs for 2-45 minutes before self-recoverycritical
▸
Worker and thread tuning controls memory vs CPU tradeoffinfo
▸
gthread workers hang at worker_connections limit with keepalive connectionscritical
▸
SQLAlchemy QueuePool limit exceeded causes request timeoutscritical
▸
Database connections exceed calculated maximum due to leaked connectionscritical
▸
Connection queuing with sync workers under high concurrent loadwarning
▸
Nginx connection refused errors with no application logswarning
▸
Worker timeout from long running requests exceeding timeout thresholdwarning
▸
Slow external dependencies cause worker saturation and cascading failureswarning
▸
Limit worker connections to prevent memory accumulationwarning
▸
Request persistence after platform timeout causes resource wastewarning
▸
IO-bound tasks require async or threaded workersinfo
▸
gthread worker accepts connections beyond thread capacitywarning
▸