HTTP 408 Request Timeout
HTTP 408 Request Timeout means the server closed the connection because the client did not complete its request within the time the server was willing to wait. Unlike 504 Gateway Timeout, which is a proxy timing out on an upstream server, 408 is the server timing out while waiting for the client to send a complete request.
Quick reference
| Code | 408 |
|---|---|
| Name | Request Timeout |
| Category | 4xx Client Errors |
| Specification | RFC 9110 §15.5.9 |
| IANA status | Assigned |
| Cacheable | No |
| Client action | Retry the request with a complete payload delivered promptly. Check network and client-side timeouts. |
| In-depth guide | HTTP 408 full guide → |
What HTTP 408 means
RFC 9110 defines 408 as indicating that the server did not receive a complete request message within the time that it was prepared to wait. The server may close the connection after sending a 408 response or may leave it open for reuse. If left open, the connection can be used for a new request.
HTTP/1.1 uses persistent connections by default, meaning a TCP connection can carry multiple sequential requests. Between requests, the server starts a keepalive timer. If no new request begins before the timer expires, the server sends 408 and closes the connection. This is a normal part of connection lifecycle management, not an error condition in most cases.
408 can also occur when the client begins sending a request but does not finish it — the headers arrive but the body is never completed, or a large file upload stalls partway through. The server waits up to its configured request timeout and then closes with 408.
Common causes
Slow network connection
The client's connection is too slow to deliver the request body within the server's timeout window. This is common with large file uploads on poor connections or mobile networks with high latency and packet loss.
Server keepalive timeout
In HTTP/1.1, the server keeps the connection open for a period after a response. If no new request arrives in that window, the server returns 408 and closes. Many HTTP clients silently retry on a new connection — so this 408 may never be visible to the application.
Client-side timeout or hang
The client started sending a request but froze before completing it — a paused upload, a stalled streaming request, or a client-side bug that sends headers but never sends the body. The server waits, then gives up with 408.
DDoS mitigation or rate limiting
Some servers return 408 as part of anti-abuse measures — closing connections from clients that are sending requests too slowly, which is a common pattern in slowloris-style denial-of-service attacks.
How to fix a 408
- Retry the request. Many 408s are transient — the connection was closed for keepalive housekeeping and the retry succeeds on a new connection. HTTP clients typically retry 408 automatically.
- Check client-side timeout settings. Ensure your HTTP client has a sufficient request timeout configured. If the client times out before the server's timeout, the client may not even see the 408.
- Break up large uploads. For large file uploads, use chunked transfer or multipart uploads with resumable upload support. A large single-part upload on a slow connection is vulnerable to 408.
- Reduce request size. If the body is larger than necessary, reduce it. Compress the payload where appropriate.
- Check server timeout configuration. If you control the server and legitimate clients are hitting 408 regularly, increase the request body timeout. Be careful not to set it too high — a very long timeout makes the server vulnerable to slowloris attacks.
408 vs related timeout codes
FAQ
What does HTTP 408 mean?
HTTP 408 means the server closed the connection because it did not receive a complete request within its timeout period. The client should retry on a new connection.
Is a 408 error my fault?
Usually yes, from the server's perspective — the client did not complete the request in time. But it is often caused by network conditions, not a bug in the client. Retry the request.
Why do I see 408 in server logs when clients report no error?
HTTP clients automatically retry on a new connection after a 408, so the end user often sees a successful response on the retry. The 408 in the server log reflects the closed idle connection, which is normal connection lifecycle management.
How is 408 different from 504?
408 is the origin server telling the client it took too long to send the request. 504 is a proxy telling the client that the origin server took too long to respond to the proxy's forwarded request.
Related resources
On this site: HTTP 408 Request Timeout — full guide · HTTP 504 Gateway Timeout · HTTP 429 Too Many Requests · All 4xx client errors
Standards: RFC 9110 §15.5.9 · IANA HTTP Status Code Registry · MDN Web Docs: 408