408 Request Timeout

The server gave up waiting for the client to finish sending the request.

Status

HTTP/1.1 408 Request Timeout

Details

408 is about the request, not the response. The server opened a connection, waited for a complete request, and the client did not send one in time. Servers also use it to reap idle keep-alive connections, sending 408 and closing rather than holding sockets open indefinitely.

The distinction from 504 matters when debugging: 408 means the client was too slow, 504 means an upstream server was. A 408 on a large upload usually means the connection is too slow for the configured body timeout.

Headers

Common causes

How to fix it

As the client

As the server

Examples

POST /upload HTTP/1.1
Host: api.example.com
Content-Length: 5242880

(client stalls mid-body)

HTTP/1.1 408 Request Timeout
Connection: close

Notes for proxy users

Through a proxy, a 408 can come from the proxy or from the origin, and the two look identical to the client. If retries through the same endpoint keep timing out while direct requests do not, test the proxy connection on its own before changing application timeouts.

Specifications

RFC 9110 §15.5.9

See also