Nginx+tomcat Slow response problem location

Source: Internet
Author: User
Nginx + Tomcat Architecture Web Services, users feel very slow response, how to troubleshoot it? You can check Nginx's Access.log the first time. The $request _time field is defined in Log_format, which refers to the time from when the user requests the data to the reply data is sent.

Is it slow in nginx, Tomcat or something?

Log_format also provides a $upstream _response_time field, which is the time to start a connection from Nginx to the back end and then close the connection until the data is accepted.

That is to say:

If the $request _time is not quite the same as $upstream _response_time, it is necessary to locate the slow request of the upstream service Tomcat by means of Btrace (Java application).

If the difference is very large, that is, the $upstream_response_time value is relatively small, you need to look at the Nginx module configuration or Nginx and the client's network whether there is a performance bottleneck.

The above describes the Nginx+tomcat slow response problem localization, including the tomcat,nginx aspects of the content, I hope the PHP tutorial interested in a friend helpful.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.