Request Timeout
Production Risk
Moderate. It can be a symptom of network problems or a misconfigured/overloaded server. Frequent 408s can disrupt user experience.
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.
- 1A slow or unstable network connection prevents the client from sending a full request in time.
- 2The client started a request but never completed it.
- 3The server has a short timeout configuration and is under heavy load.
A client opens a connection to a server but fails to send any data before the server's idle timeout period expires.
(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.
// 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.
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