Request Timeout
Client Error (4xx)The 408 Request Timeout status code indicates that the server did not receive a complete request within the time it was prepared to wait. The server closes the connection. This is different from a gateway timeout (504), which occurs when a backend server is too slow. The 408 means the client was too slow in sending the request.
What is HTTP 408 Request Timeout?
HTTP 408 Request Timeout is a client error (4xx) status code. The 408 Request Timeout status code indicates that the server did not receive a complete request within the time it was prepared to wait. The server closes the connection. This is different from a gateway timeout (504), which occurs when a backend server is too slow. The 408 means the client was too slow in sending the request. Common causes include slow network connection and client paused during request sending. To fix it, check your network connection stability.
Example Response
HTTP/1.1 408 Request Timeout Connection: close
Common Causes
- • Slow network connection
- • Client paused during request sending
- • Large request body with insufficient bandwidth
- • Server timeout configured too aggressively
How to Fix
- 1. Check your network connection stability
- 2. Reduce request payload size if possible
- 3. Increase the server's request timeout setting
- 4. Retry the request — transient network issues often resolve themselves
- 5. Use keep-alive connections to reduce connection overhead
Frequently Asked Questions
What is the difference between 408 and 504?
408 means the client was too slow sending the request to the server. 504 means the server (acting as a gateway) was too slow getting a response from an upstream server. 408 is a client-side issue; 504 is a server-side issue.
Should I automatically retry on 408?
Yes, 408 is safe to retry since the server did not process the request. Implement exponential backoff to avoid overwhelming the server.
How do I set the request timeout on my server?
In nginx, use client_body_timeout and client_header_timeout. In Node.js/Express, use server.requestTimeout. In Apache, use Timeout directive.