How can i debug 499 error

Sometimes i see 499 error in access log and response_time about 30 sec. How could i debug that? thanks

If it happens around when you're reloading your web app, then it's just that the queue of requests that built up while your web app was reloading got too long and so some requests got a 499.

If it happens with the same view every time, then it's something in the view that may be crashing your web worker process.

If it happens when your web app is getting more than normal traffic, then the web app is overloaded. That is that there are no more workers to handle the incoming requests and the queue of requests waiting for a worker got too long.