How to troubleshoot application Gateway return HTTP Code 502 or client to get Application Gateway response slow Problem (ii)

Source: Internet
Author: User
Tags response code

Problem description

The troubleshooting steps in How to troubleshoot an application gateway that returns HTTP Code 502 or the client gets slow response from the application Gateway (a) can be judged as a response exception due to a WEB server's own problem.

You can then turn on failed request tracing (the FRT McCartney) feature in IIS to track and analyze the cause of this response exception.

The specific steps are as follows (for example, in this article, Windows Server 2012):

  1. Turn on FRT in the System administration tool.

  2. When on, you can see the Failed Request tracing option in the corresponding sites panel in IIS Manager, and then configure FRT rule in the action Panel on the right.

  3. Before you configure rule, first open and configure the trace file maximum number:

  4. Configure FRT rule:

    1. To configure the match request content suffix:

      To minimize the scope of the diagnosis, consider configuring a matching file suffix for the request to the problematic URL.

    2. To configure the matching criteria:

      There are three kinds of status Code,timetaken, as well as the event severity, where the conditions are related to each other, such as can make a request for HTTP Response code 200 but timetaken time more than 5 seconds tracin G.

    3. To configure the trace provider:

    4. After the configuration is complete:

  5. Once the problem arises, %SystemDrive%\inetpub\Logs\FailedReqLogFiles\ there will be an. xml file generation, and an. xml file corresponds to the tracing of the request, judging which request to analyze based on the timestamp.

  6. It is recommended to use a browser to open, if you want to copy this. xml file to the analysis on another server, it is recommended to connect freb.xsl to copy the past, because this file is FRT log format file, when opened with a browser, it will be in the format of this file, the readability is better.

  7. Open Task Manager and log the PID of the current IIS process:

    If it is multi-site, you can determine the PID of the process of the problematic site based on the name of the application pool.

  8. Then open the FRT. XML, which can be confirmed by PID:

  9. You can then click on Request details to analyze which part of the Timetaken is causing the delay response, thereby locking the problem range:

As you can see, each detail of this request is listed in the trace information, and the time taken for each step is timetaken, as well as the details of the request and return information, such as the Header,handler information:

With trace information, you can help the application developer determine where the problem is, whether the application code needs to be adjusted, or which part of the code to adjust, providing the necessary information to finally resolve the problem with the Web app itself.

How to troubleshoot application Gateway return HTTP Code 502 or client to get Application Gateway response slow Problem (ii)

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.