3

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?

gerasalus
  • 7,538
  • 6
  • 44
  • 66
  • Did you figure this out? – marc Aug 30 '18 at 22:46
  • 1
    yes, unstable mobile connection, basically it was just cut off because of flaky network, switching towers, powersaving etc. You cannot have a a reliable connection open for such a long time, we switched to polling with id and it was all good – gerasalus Aug 31 '18 at 12:28

1 Answers1

0

I was reading this unanswered question which suggests that one potential source is from impatient clients hitting the refresh button.

This seems to be consistent with your observation that clients are alive, and there are requests after getting 499.

Community
  • 1
  • 1
Richard Smith
  • 45,711
  • 6
  • 82
  • 81
  • No, this is not that case. If clients would hit refresh, i would see our single page app reloading, and not another request from the client side, which is only executed on http promise (this is angular) failed hook. At least for that long running request – gerasalus Mar 12 '16 at 19:47