Nginx-tornado-django request timeout

We are using nginx-tornado-django to provide web services. That is, there is no web page interface. The nginx server performs the load balancing function. The server has 8 cores, so we ran 8 tornado-django processes on each server. Memcached is also used to improve performance. Requests per day are about 1 million per server. We are using MySQL as Backend DB.

The code has been checked and corrected. Our profiling shows that typically each request is processed within 100ms. The problem is that we find that about 10 percent of requests suffer from timeouts. Many requests did not even reach the tornado. I don't really have much experience in setting up nginx / tornado / MySQL. Right now, I have no clue as to what is going wrong. Any advice is appreciated.

+2


a source to share


1 answer


You may want to profile each component and layer separately: nginx, tornado, django and mysql



I'm not sure about the details of what your application is doing and this is just a guess, but it may be slowing down when reading / writing data to mysql. But your profiling should figure out exactly where the problem is happening.

+1


a source







All Articles