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
As you point 499 a connection abortion logged by the nginx. But usually this is produced when your backend server is being too slow, and another proxy timeouts first or the user software aborts the connection. So check if uWSGI is answering fast or not of if there is any load on uWSGI / Database server.
In many cases there are some other proxies between the user and nginx. Some can be in your infrastructure like maybe a CDN, Load Balacer, a Varnish cache etc. Others can be in user side like a caching proxy etc.
If there are proxies on your side like a LoadBalancer / CDN ... you should set the timeouts to timeout first your backend and progressively the other proxies to the user.
If you have:
user >>> CDN >>> Load Balancer >>> Nginx >>> uWSGI
I'll recommend you to set:
n seconds to uWSGI timeoutn+1 seconds to nginx timeoutn+2 senconds to timeout to Load Balancern+3 seconds of timeout to the CDN.If you can't set some of the timeouts (like CDN) find whats is its timeout and adjust the others according to it (n, n-1...).
This provides a correct chain of timeouts. and you'll find really whose giving the timeout and return the right response code to the user.