DevToolsmith

HTTP 408 Request Timeout

HTTP 408 Request Timeout means the server closed the connection because the client took too long to send the request. The request contains an error or can’t be fulfilled. Retrying unchanged won’t help.

Class
4xx Client error
Standard
RFC 9110
Cacheable by default
No
Safe to retry
Yes, usually
Go constant
http.StatusRequestTimeout

What HTTP 408 means

The server waited for the client to finish sending the request and gave up. It is not about a slow server; that is 504. Browsers sometimes see 408 when a preconnected idle connection is closed by the server, and retry automatically.

How to fix a 408 error

  • Slow uploads on mobile networks can hit the server’s body timeout (nginx client_body_timeout, 60 seconds by default).
  • It is generally safe to retry a request that got 408.

Retrying

Yes, usually. It is often temporary, so retry with exponential backoff and give up after a few attempts.

Example response

HTTP/1.1 408 Request Timeout
Date: Wed, 21 Oct 2026 10:30:00 GMT
Connection: close
Content-Type: application/json

How to return 408

Node.js (Express)
res.status(408).json({ error: 'Request Timeout' });
Python (FastAPI)
from fastapi import HTTPException

raise HTTPException(status_code=408, detail="Request Timeout")
Go (net/http)
http.Error(w, http.StatusText(http.StatusRequestTimeout), http.StatusRequestTimeout)
nginx
location /private/ {
    return 408;
}

Related status codes

Other 4xx status codes

400 Bad Request · 401 Unauthorized · 402 Payment Required · 403 Forbidden · 404 Not Found · 405 Method Not Allowed · 406 Not Acceptable · 407 Proxy Authentication Required · 409 Conflict · 410 Gone · 411 Length Required · 412 Precondition Failed · 413 Content Too Large · 414 URI Too Long · 415 Unsupported Media Type · 416 Range Not Satisfiable · 417 Expectation Failed · 418 I’m a Teapot · 421 Misdirected Request · 422 Unprocessable Content · 423 Locked · 424 Failed Dependency · 425 Too Early · 426 Upgrade Required · 428 Precondition Required · 429 Too Many Requests · 431 Request Header Fields Too Large · 444 No Response · 451 Unavailable For Legal Reasons · 499 Client Closed Request

See the full list of HTTP status codes.

Sources

Spotted a mistake? Email hello@devtoolsmith.com and we’ll fix it.

Frequently asked questions

What does HTTP 408 Request Timeout mean?

HTTP 408 Request Timeout means the server closed the connection because the client took too long to send the request. The server waited for the client to finish sending the request and gave up. It is not about a slow server; that is 504. Browsers sometimes see 408 when a preconnected idle connection is closed by the server, and retry automatically.

How do I fix HTTP 408?

Slow uploads on mobile networks can hit the server’s body timeout (nginx client_body_timeout, 60 seconds by default). It is generally safe to retry a request that got 408.