HTTP Status Code 408 = “Request Timeout”
The server timed out waiting for the client to send a complete request.
In simple terms:
The client took too long to send data, so the server closed the connection.
Common causes
- Slow internet connection
- Large upload taking too long
- Idle browser/client
- Network interruption
- Server timeout settings too strict
- API request delays
- Reverse proxy timeout Example
http id=”m7q2we”
HTTP/1.1 408 Request Timeout
Common scenarios
- Uploading large files
- Slow API requests
- Unstable mobile networks
- Browser inactivity
- Long-running form submissions Fixes for users
- Refresh the page
- Check internet connection
- Retry request
- Reduce upload size
- Disable VPN/proxy temporarily Fixes for developers
- Increase server timeout
Nginx
nginx id=”v4k8ra”
client_body_timeout 300;
proxy_read_timeout 300;
- Apache
apache id=”n3p1xd”
Timeout 300
- Node.js Express
js id=”u8w5kc”
server.timeout = 300000;
- PHP
ini id=”g7q2mv”
max_execution_time = 300
max_input_time = 300
- Axios timeout
js id=”r4k9zn”
axios({
timeout: 30000
});
Difference between 408 and 504
| Code | Meaning |
|---|---|
408 | Client took too long |
504 | Upstream server took too long |
Related HTTP status codes
| Code | Meaning |
| — | |
| 400 | Bad Request |
| 408 | Request Timeout |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
| 502 | Bad Gateway |
| 504 | Gateway Timeout |