HTTP 408 Request Timeout
Updated Free mock REST & WebSocket APIs
HTTP 408 Request Timeout — The server timed out waiting for the client to finish sending the request.
- Class
- 4xx Client Error
- Defined in
- RFC 9110 §15.5.9
- Official
- Yes (IANA registry)
- Cacheable by default
- No (unless Cache-Control/Expires say so)
- Safe to retry
- Yes, after a delay (respect Retry-After)
Try it: get a real 408 response
Our test endpoint answers every request with 408 Request Timeout.
curl -i https://mockfox.dev/api/status/408Use it in tests, health-check monitors or to see how your client handles a 408. Add ?delay=2000 to slow it down.
What does HTTP 408 mean?
408 Request Timeout means the server didn't receive a complete request within the time it was prepared to wait, and is closing the connection. The client can retry the request on a new connection.
It's about the client being slow to send the request — not the server being slow to answer (that's a 504 from a proxy, or simply a long wait).
When is 408 used?
- A slow or unstable connection stalls in the middle of uploading a body.
- A browser pre-opens a connection that's never used, and the server times it out (Chrome then quietly retries).
- Load balancers close idle keep-alive connections.
Common causes of a 408
- Slow, congested or flaky network (mobile data, overloaded Wi-Fi, VPN).
- Large uploads on a slow uplink exceeding the server's body timeout.
- Server timeouts set too low (nginx
client_body_timeout/client_header_timeoutdefault to 60s). - A client that sends
Content-Lengthlarger than the body it actually sends, so the server keeps waiting.
How to fix 408 Request Timeout
If you're visiting the site
- Reload the page; 408s are often transient.
- Check your internet connection, switch networks or disable your VPN.
- For uploads, try a smaller file or a faster connection.
If you run the site or API (developers)
- Increase body/header timeouts for upload endpoints if legitimate requests are slow.
- Use resumable or chunked uploads (tus, S3 multipart) for large files.
- Make sure clients send a correct
Content-Lengthor use chunked encoding. - Distinguish 408 from 504/524 in monitoring: 408 is the client side being slow.
Returning or handling 408: server examples
nginx
http {
client_header_timeout 30s;
client_body_timeout 120s; # time between two reads of the body
}Node.js / Express
const server = app.listen(3000); // Node 18+ defaults: requestTimeout 300s, headersTimeout 60s server.requestTimeout = 120_000; // whole request must arrive in 2 min server.headersTimeout = 30_000;
Next.js
// app/api/example/route.ts (Next.js App Router)
// Route handlers can't extend the client upload timeout; for large
// uploads, send files directly to object storage with a signed URL.
export async function POST() {
const url = await createSignedUploadUrl();
return Response.json({ url });
}Example 408 response
HTTP/1.1 408 Request Timeout Connection: close Content-Type: text/html Content-Length: 0
Related status codes
- 504 Gateway TimeoutA gateway or proxy didn't get a response from the upstream server in time.
- 499 Client Closed Requestnginx logs 499 when the client closed the connection before the server finished responding.
- 429 Too Many RequestsThe client sent too many requests in a given time (rate limiting).
Related tools
Frequently asked questions
What's the difference between 408 and 504?
408: the server gave up waiting for the client to send the request. 504: a gateway gave up waiting for the upstream server to send the response.
Is it safe to retry after a 408?
Yes. The server never processed the request, so retrying is safe even for non-idempotent methods — browsers retry automatically in some cases.
Why do I see 408 in my logs with no user complaints?
Browsers open speculative connections and leave them unused; servers log a 408 when timing them out. These are harmless.