Technologies/Prometheus/gunicorn.requests
PrometheusPrometheusMetric

gunicorn.requests

Total HTTP requests processed
Dimensions:None

Technical Annotations (32)

Configuration Parameters (11)
rate_windowrecommended: 5m
Time window for calculating error rate to smooth transient spikes
error_thresholdrecommended: 0.01
1% error rate threshold triggering critical alert
NEW_RELIC_CONFIG_FILErecommended: newrelic.ini
Path to New Relic agent configuration file for APM integration
accesslogrecommended: '-'
logs requests to stdout; critical for production observability
statsd_prefixrecommended: your_app_name
prefix for metrics sent to StatsD aggregator
statsd_hostrecommended: metrics-aggregator:9125
StatsD endpoint for pushing metrics from all workers
worker_connections
low values cause worker hangs with keepalive connections under concurrent load
max_requests
Automatic worker restart trigger that can cause brief unavailability
proxy_http_versionrecommended: 1.1
Ensures proper HTTP/1.1 handling at nginx proxy layer
proxy_set_header Connectionrecommended: ""
Prevents connection header issues in nginx proxy configuration
workersrecommended: 2*CPU_cores+1
optimal worker count formula for balancing throughput and resource usage
Error Signatures (4)
5xxhttp status
status=~"5.."log pattern
502http status
400http status
CLI Commands (3)
pip install newrelicmonitoring
newrelic-admin generate-config YOUR_LICENSE_KEY newrelic.inimonitoring
NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program gunicorn myapp.wsgi:applicationmonitoring
Technical References (14)
http_requests_totalcomponentnewrelic-admincomponenttransaction tracesconceptgthreadcomponentkeepaliveconceptSIGTERMconceptmax_requestsconfigurationTransfer-EncodingprotocolRFC 7230protocolCWE-444conceptchunked encodingprotocolHTTP request smugglingconceptreverse proxycomponentOS thrashingconcept
Related Insights (9)
High 5xx error rate indicates service degradationcritical
Gunicorn startup with New Relic APM wrapperinfo
Request logging disabled by default prevents troubleshootingwarning
Multi-process model complicates Prometheus metrics collectioninfo
gthread workers hang at worker_connections limit with keepalive connectionscritical
Automatic worker restarts cause brief 502 errorswarning
Transfer-Encoding header smuggling enables security bypasscritical
Request interpretation desynchronization between proxy and backendcritical
Excessive Gunicorn workers cause OS thrashing and performance degradationwarning