408 Request Timeout
4xx client error
The server gave up waiting for the client to finish sending the request.
408 means the client was too slow, not the server. The connection opened, but the full request didn't arrive within the server's timeout. Servers also send 408 when closing idle keep-alive connections. Because the request never fully arrived, it's safe to retry.
| Class | 4xx Client Error |
|---|---|
| Retry? | Yes — safe to retry |
| Cacheable by default | No — only with explicit Cache-Control |
| Response body | Allowed |
| Defined in | RFC 9110 §15.5.9 — 408 Request Timeout |
Example response
HTTP/1.1 408 Request Timeout
Content-Type: application/json
Content-Length: 27
{"error":"Request Timeout"}Common causes
- Slow or flaky networks — mobile data, overloaded Wi-Fi.
- Large uploads over slow links exceeding the server's body timeout.
- Idle keep-alive connections being closed (browsers retry these automatically).
How to fix it
- Retry the request — the spec expects clients to.
- For large uploads, use chunked or resumable uploads.
- On the server, raise
client_body_timeout(nginx) or its equivalent if legitimate clients hit it.
Useful here: Retries, backoff and Retry-After
Send a 408 from your server
Express
res.status(408).json({ error: "Request Timeout" });Next.js route handler
return Response.json({ error: "Request Timeout" }, { status: 408 });Flask
return {"error": "Request Timeout"}, 408Go net/http
http.Error(w, "Request Timeout", http.StatusRequestTimeout)
nginx
return 408;
Check what a URL returns
Print just the status line from the command line, or check a whole list of URLs at once, with their response headers, in the HTTP Status Checker.
curl -sI https://example.com/your-path | head -n 1
Frequently asked questions
408 vs 504?
408: the server timed out waiting for the client. 504: a gateway timed out waiting for the upstream server. One is a slow client; the other is a slow backend.
Related status codes