HTTP/4xx (Client Error)
499 Client Closed Request
Non-standard Nginx code logged when the client closes the connection before the server sends a response.
❓ Why does this happen?
The upstream (Node.js, PHP-FPM, Python) is too slow, so the browser, load balancer, or mobile client gave up waiting.
✅ How to fix it
Profile slow upstream handlers, add caching, and align client, load balancer, and proxy_read_timeout values.
Return or handle 499 in your stack
// Note: 499 is normally generated by Nginx, not your app.
// Emitting it yourself is only useful for testing client error handling.
// app/api/resource/route.ts
export function GET() {
return Response.json(
{ error: "Client Closed Request", status: 499 },
{
status: 499
}
);
}Live 499 mock endpoint
Point your app, tests, or retry logic at this free public URL to reproduce a real 499 response (CORS enabled, optional ?delay=ms up to 5000).
https://castov.com/api/mock/499499 vs similar status codes
Frequently Asked Questions
What does HTTP Status 499 mean?
Why am I getting a 499 status code?
How do I fix a 499 Client Closed Request error?
What is the difference between 499 Client Closed Request and 504 Gateway Timeout?
How can I test how my app handles a 499 response?
Other 4xx status codes
Browse the full HTTP status codes directory or troubleshoot terminal errors in the Error Fix Encyclopedia.