A 499 Client Closed Request error is an unofficial status code introduced by nginx to indicate that the client closed the connection before the server finished processing and responding to the request.
(Note: Code 499 is also used by Esri ArcGIS Server to mean “Token Required”.)
When an nginx reverse proxy receives a request, it forwards it to an upstream backend (such as PHP-FPM, Node.js, Python, or an SQL database). If the user closes the browser tab, clicks “Stop”, or navigates away before the backend finishes, nginx terminates the connection and logs HTTP 499.
Determining why
- The user cancelled or refreshed a slow-loading web page.
- A client-side JavaScript timeout aborted the fetch request before the server finished.
- A reverse proxy or load balancer upstream had a shorter timeout than the backend processing time.
Steps you could possibly take:
- Do not repeatedly mash reload - If an action is taking several seconds (such as generating a report), clicking refresh repeatedly creates multiple stranded 499 requests and slows down the server further.
- If you are the server administrator or developer:
- Check your slow query logs. 499 errors frequently signify backend database bottlenecks that cause visitors to give up waiting.
- In nginx, you can tell the server whether to continue running upstream scripts when clients disconnect using
proxy_ignore_client_abort on;.