408
HTTPERRORNotable4xx Client ErrorHIGH confidence

Request Timeout

Production Risk

Moderate. It can be a symptom of network problems or a misconfigured/overloaded server. Frequent 408s can disrupt user experience.

What this means

This response is sent on an idle connection by some servers, even without any previous request by the client. It means that the server would like to shut down this unused connection. The server did not receive a complete request from the client within the time that it was prepared to wait.

Why it happens
  1. 1A slow or unstable network connection prevents the client from sending a full request in time.
  2. 2The client started a request but never completed it.
  3. 3The server has a short timeout configuration and is under heavy load.
How to reproduce

A client opens a connection to a server but fails to send any data before the server's idle timeout period expires.

trigger — this will error
trigger — this will error
(Client connects but sends data too slowly or not at all)

expected output

HTTP/1.1 408 Request Timeout

Fix 1

Increase Server Timeout

WHEN You control the server and legitimate clients are timing out.

Increase Server Timeout
// Nginx example
keepalive_timeout 75s;

Why this works

Server Configuration

Fix 2

Retry the Request

WHEN You are the client and suspect a temporary network issue.

Retry the Request
Implement retry logic in your client application, possibly with exponential backoff.

Why this works

Client-Side Logic

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All HTTP errors