Possible reason for NGINX 499 error codes

前端 未结 15 1559
没有蜡笔的小新
没有蜡笔的小新 2020-11-28 02:54

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

相关标签:
15条回答
  • 2020-11-28 03:35

    ...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)

    0 讨论(0)
  • 2020-11-28 03:36

    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:

    • nginx_proxy
    • nginx
    • php_fpm running the actual app.

    The symptom was a "502 Gateway Timeout" on the application login prompt. Examination of logs found:

    • the button works via an HTTP POST to /login ... and so ...
    • nginx-proxy got the /login request, and eventually reported a timeout.
    • nginx returned a 499 response, which of course means "the host died."
    • the /login request did not appear at all(!) in the FPM server's logs!
    • there were no tracebacks or error-messages in FPM ... nada, zero, zippo, none.

    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.

    0 讨论(0)
  • 2020-11-28 03:36

    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).

    0 讨论(0)
提交回复
热议问题