Logo
DevUtilsAll-in-one toolkit
Back to all codes
4084xx
4xx — Client Error

Request Timeout

The server timed out waiting for the request.

What it means

The HTTP 408 Request Timeout response status code means that the server would like to shut down this unused connection. It is sent on an idle connection by some servers, even without any previous request by the client.

How it works

  • 1The client opens a TCP connection to the server.
  • 2The server waits for the client to send the HTTP headers/body.
  • 3The client takes too long (e.g., due to a terrible network connection).
  • 4The server closes the connection and returns 408 to free up its resources.

Why you're seeing this

  • Network latency or packet loss.
  • A malicious Slowloris attack intentionally keeping connections open.

How to fix it

  • Clients can safely repeat the request, as 408 implies the server did not process it.

Framework Implementations

Nginx

# Handled at the infrastructure level
client_body_timeout 10s;
client_header_timeout 10s;

Real-Life Scenarios

Servers use this automatically to drop slow-loris attacks or extremely slow connections. Application developers rarely throw this manually.

Slow Mobile Connection

A user on a train enters a tunnel right as their phone opens a connection. The server waits 30 seconds, gives up, and sends 408.

HTTP Transaction

1. Client Request

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

(Client sends 10 bytes and then connection hangs...)

2. Server Response

HTTP/1.1 408 Request Timeout
Connection: close

Request timed out.

SEO Implications

Search engines may retry, but frequent timeouts can negatively impact crawl rate.

Related Codes