IIS 10 intermittent slow respond

IvanT 6 Reputation points
2022-02-10T02:37:45.397+00:00

I have an application running in IIS 10 at Windows Server 2019.
The web page can load normally within a second. However, sometimes, the page takes about 15 seconds.
I enable Failed Request Tracing (FRT), and keep sending the request every 30 seconds.

For the requests with long respond, from the FRT logs, there is an entry takes the 15 seconds.

128.  -GENERAL_SET_RESPONSE_HEADER 
HeaderName Cache-Control 
HeaderValue private 
Replace true 
Informational
15047ms

For the respond with "normal" respond time, it just takes about 47ms.

In addition, recycling is using default which is 1740 minutes.
Preload is True.

Anyone has idea why "set response header" can take such long time?
What else can be checked to troubleshoot?
Thanks.

Windows development | Internet Information Services
0 comments No comments
{count} vote

4 answers

Sort by: Most helpful
  1. Sam Wu-MSFT 7,561 Reputation points Microsoft External Staff
    2022-02-11T02:16:33.89+00:00

    @IvanT

    Here are a few ideas, hope it helps you.

    1. Can you reproduce in an isolated environment that you can attach a debugger?
    2. When you say slowdown, what is the application doing? Are remote calls being done? If so, have you checked the resources. have you put additional debugging in those portions of the application?
    3. Is the slowness in the same portion of the application?
    4. Does the IIS server spike to 99% and memory go haywire when it hangs?
    5. Does a recycle resolve the problem?

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. IvanT 6 Reputation points
    2022-02-11T06:21:00.89+00:00

    Hi @Sam Wu-MSFT ,

    Thank you for reply.

    1. Can you reproduce in an isolated environment that you can attach a debugger?
      Yes, it is still in test environment and I can attach the debugger. May you further give advices on what to do or any guideline document?
    2. When you say slowdown, what is the application doing? Are remote calls being done? If so, have you checked the resources. have you put additional debugging in those portions of the application?
      The application simply forward the requests to another server. And we checked that the request/respond are fine at another server.
    3. Is the slowness in the same portion of the application?
      Yes.
    4. Does the IIS server spike to 99% and memory go haywire when it hangs?
      No. The CPU and memory are normal.
    5. Does a recycle resolve the problem?
      No. After recycle, it will have slow respond. I think this is expected for the first request after recycle.
      After that, the following responds have normal respond time. But within 30 minutes, it is very likely to have another slow respond.

    -------------------------------------------------------------------------------------

    173506-slow-response.png

    I used network monitor to capture the traffic when making the request.
    The picture shows that there is no traffic between #829 and #1654 for about 15 seconds.


  3. IvanT 6 Reputation points
    2022-02-15T08:18:00.3+00:00

    I have no idea why it makes the request to ctldl.windowsupdate.com after the TCP & TLS and before sending the actual HTTP body (#1654).
    And because our machine has no internet access, it will have 15 seconds timeout when try to access ctldl.windowsupdate.com.
    Now, I can temporarily workaround the slow respond issue by disable "Automatically update certificates in the Microsoft Root Certificate Program" stated in this article https://support.microsoft.com/en-us/topic/an-automatic-updater-of-untrusted-certificates-is-available-for-windows-vista-windows-server-2008-windows-7-and-windows-server-2008-r2-117bc163-d9e0-63ad-5a79-e61f38be8b77

    0 comments No comments

  4. IvanT 6 Reputation points
    2022-02-21T01:53:31.843+00:00

    Latest update.
    Our web application will make request to other server through https and the certifcates of target server are only imported to Current User certifcate store.
    Now, it can avoid IIS worker process accessing to ctldl.windowsupdate.com after the certificates are imported to Local Machine certificate store.

    But there is still an unknown that previously, the request to ctldl.windowsupdate.com does not appear in every HTTPS to other server. Hence, only some requests take 15 seconds long while other requests can be finished in a second. Dont know which setting to control the frequency when to make such request to ctldl.windowsupdate.com


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.