408 Request Timeout
The server gave up waiting for the client to finish sending the request and closed the idle connection.
At a glance
- Status code
- 408 Request Timeout
- Class
- 4xx, client error, the request itself is the problem
- Defined in
- RFC 9110
- Cacheable by default
- no
- Response body
- Optional.
In detail
This is about the request arriving slowly, not about the server being slow. The server was ready and the bytes did not come.
Servers should send Connection: close with it, because the connection state is no longer trustworthy.
The request is idempotent from the server's point of view (nothing was processed) so retrying is safe. A slow or lossy upload path is the usual cause.
Examples
HTTP/1.1 408 Request Timeout
Connection: close
Content-Length: 0Things that catch people out
- Do not confuse 408 with 504. 408 is the client being slow to send. 504 is an upstream server being slow to answer.
- Some servers send 408 to tidy up keep-alive connections that simply went idle, so an occasional 408 with no request attached is normal noise.
Try it: HTTP Request Builder
Build a request with any method, headers and body, send it, and read the status line the server returns.
HTTP Request Builder
LOCAL · Browser-OnlyBuild and test HTTP requests with custom headers and body
Authentication
Headers
Generate Code
curl -X GET 'https://api.example.com/endpoint' \
-H 'Content-Type: application/json'Showing a sample URL. Enter your endpoint above to update the snippet.
Related HTTP status codes
All http status codes →504 Gateway Timeout
A proxy gave up waiting for the upstream server to answer. The upstream may still be working on the request.
503 Service Unavailable
The server is temporarily unable to handle the request, because it is overloaded or deliberately down for maintenance. The condition is expected to clear.
400 Bad Request
The server refused the request because it was malformed. The client must change something before retrying, because repeating the same bytes will fail.
409 Conflict
The request clashes with the current state of the resource, for example an edit based on a version that has since changed.
410 Gone
The resource existed and has been permanently removed with no forwarding address. Stronger and more useful than 404 when you know the removal is final.
411 Length Required
The server refuses the request because it did not include a Content-Length header.
Tools for this
- HTTP Request Builder Free online HTTP request builder - build and test HTTP requests with custom headers and body
- HTTP Headers Checker Free online HTTP headers checker - view HTTP response headers for any URL