Recently we've switched apache to nginx with http2 support for our web application, and we're seeing quite a lot of 499 errors.
Our setup:
- Ubuntu machine running on Amazon AWS
- Nginx/1.9.12 acting as proxy (and ssl offload) for node application (same machine)
- Single Page App on the client side
My initial thought was that clients simply close their browsers, but from the logs, i see that ~95% clients are alive, and there are requests after getting 499.
55% of 499 errors occur for http2 and 45% for http1.1 version, so no trend here. 80% of the requests come from mobile devices (bad connection?)
But of particular worry there is one endpoint which might take 5-15 seconds to complete (PUT request). For that endpoint:
- ~95% of the 499 errors are for http2 version
- ~95% of the request are from mobile devices
- almost all clients are alive (we see that from logs because after failed request client side javascript issues another request to different endpoint)
- There is no time pattern - sometimes client gets 499 after just 0.1 second, sometimes 3-9 seconds
- Logs don't indicate any problems on the node upstream, and this happens regularly, and there is no heavy load.
I've tried adding keepalive
to upstream, and enabling proxy_ignore_client_abort
, but that does not seem to help.
Any hints how to troubleshoot this?