What 408 means
The server didn’t receive a complete request within the time it was prepared to wait, so it closed the connection. The client can send the request again on a new connection.
When servers send it
When a client opens a connection and then sends nothing, or sends the request too slowly. Browsers that open spare connections in advance occasionally trigger it.
Common causes
- A slow or unreliable network while uploading.
- A pre-opened browser connection that went unused.
- A client that sets
Content-Lengthlarger than the body it actually sends. - Server timeouts set very low (for example nginx’s
client_body_timeout).
How to fix it as a developer
- Check that the
Content-Lengthyou send matches the body. - For large uploads on slow links, raise the server’s body timeout or upload in chunks.
- Occasional 408s in logs with no request line are usually idle pre-connections and can be ignored.
How to fix it as a visitor
- Try again, ideally on a better connection.
Related codes
- 504 Gateway Timeout: A proxy or load balancer gave up waiting for the server behind it to reply.
- 499 Client Closed Request: The client gave up and closed the connection before nginx could reply. You’ll only see it in nginx’s logs.
- 413 Content Too Large: The request body, such as an upload, is bigger than the server will accept.
Where it’s defined
408 Request Timeout is defined in RFC 9110, section 15.5.9. It’s a 4xx code, the client error class: something is wrong with the request, so sending it again unchanged won’t help.
Other 4xx codes
400 Bad Request · 401 Unauthorized · 402 Payment Required · 403 Forbidden · 404 Not Found · 405 Method Not Allowed · 406 Not Acceptable · 409 Conflict · 410 Gone · 413 Content Too Large · 414 URI Too Long · 415 Unsupported Media Type · 418 I’m a teapot · 422 Unprocessable Content · 429 Too Many Requests · 431 Request Header Fields Too Large · 451 Unavailable For Legal Reasons · 499 Client Closed Request
Or search them all in the HTTP status code list.