What nginx 499 means
nginx records 499 in its access log when the client gave up waiting, for example the user closed the tab, a mobile connection dropped, or a load balancer or HTTP client timed out first. The client never receives it. A spike in 499s usually means your backend is too slow.
499 isn’t defined in any HTTP standard. It is specific to nginx, so other servers and proxies won’t use it.
How to fix error 499
-
Compare
$request_timein the nginx log with the client’s timeout: if requests take longer than the client waits, you get 499. - Health checks from load balancers with short timeouts are a common source.
-
Set
proxy_ignore_client_abort on;if the backend should finish work even when the client leaves.
Retrying
No. Fix the request first; sending it again unchanged will get the same response.
Related status codes
- 408 Request Timeout : The server closed the connection because the client took too long to send the request.
- 504 Gateway Timeout : A proxy or gateway didn’t get a response from the upstream server in time.
- 444 No Response : Used internally by nginx to close the connection without sending any response.
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 · 408 Request Timeout · 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
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 nginx 499 Client Closed Request mean?
nginx 499 Client Closed Request is logged by nginx when the client disconnects before the server responds. nginx records 499 in its access log when the client gave up waiting, for example the user closed the tab, a mobile connection dropped, or a load balancer or HTTP client timed out first. The client never receives it. A spike in 499s usually means your backend is too slow.
How do I fix nginx 499?
Compare $request_time in the nginx log with the client’s timeout: if requests take longer than the client waits, you get 499. Health checks from load balancers with short timeouts are a common source. Set proxy_ignore_client_abort on; if the backend should finish work even when the client leaves.