I\'m getting a lot of 499 NGINX error codes. I see that this is a client side issue. It is not a problem with NGINX or my uWSGI stack. I note the correlation in uWSGI log
...came here from a google search
I found the answer elsewhere here --> https://stackoverflow.com/a/15621223/1093174
which was to raise the connection idle timeout of my AWS elastic load balancer!
(I had setup a Django site with nginx/apache reverse proxy, and a really really really log backend job/view was timing out)
I know this is an old thread, but it exactly matches what recently happened to me and I thought I'd document it here. The setup (in Docker) is as follows:
The symptom was a "502 Gateway Timeout" on the application login prompt. Examination of logs found:
POST
to /login
... and so .../login
request, and eventually reported a timeout.499
response, which of course means "the host died."/login
request did not appear at all(!) in the FPM server's logs!It turned out that the problem was a failure to connect to the database to verify the login. But how to figure that out turned out to be pure guesswork.
The complete absence of application traceback logs ... or even a record that the request had been received by FPM ... was a complete (and, devastating ...) surprise to me. Yes, the application is supposed to log failures, but in this case it looks like the FPM worker process died with a runtime error, leading to the 499
response from nginx. Now, this obviously is a problem in our application ... somewhere. But I wanted to record the particulars of what happened for the benefit of the next folks who face something like this.
Once I got 499 "Request has been forbidden by antivirus" as an AJAX http response (false positive by Kaspersky Internet Security with light heuristic analysis, deep heuristic analysis knew correctly there was nothing wrong).