networking
http
ai_generated
true
HTTP/1.1 408 Request Timeout
ID: networking/http-408-timeout
87%Fix Rate
88%Confidence
50Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| any | active | — | — | — |
Root Cause
The server closed the connection because the client did not send a complete request within the server's timeout period. This commonly occurs with slow clients, large uploads over poor connections, or idle keep-alive connections being reaped.
genericWorkarounds
-
88% success Increase the server request timeout to a reasonable value that accommodates expected client latency
1. In nginx: client_header_timeout 60s; client_body_timeout 60s; 2. In Apache: Timeout 60; RequestReadTimeout header=20-40,minrate=500 body=20-60,minrate=500 3. Measure typical client request times from access logs 4. Set timeout to 2-3x the 99th percentile request time 5. Reload the server: systemctl reload nginx
-
85% success Use chunked transfer encoding for large uploads to keep the connection active
1. Configure the client to use chunked transfer encoding: Transfer-Encoding: chunked 2. Send data in smaller chunks so the server sees activity within its timeout window 3. For file uploads, use multipart form data with progress tracking 4. If behind a load balancer, ensure it also supports chunked encoding and has appropriate idle timeouts
Dead Ends
Common approaches that don't work:
-
Retry the exact same request immediately without checking client-side issues
70% fail
If the client is genuinely slow (poor network, large payload), immediate retry will hit the same timeout. The underlying cause — slow upload speed, network congestion, or oversized request — must be addressed.
-
Increase server request timeout to very large values
65% fail
Very large timeouts allow slow clients to hold connections open indefinitely, consuming server resources. Under load, this can lead to connection pool exhaustion and denial of service for legitimate fast clients.
Error Chain
Preceded by:
Frequently confused with: