You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: support/developer/webapps/iis/site-behavior-performance/slow-page-response-hangs.md
+76-23Lines changed: 76 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Troubleshoot Slow Page Response and Hangs
3
3
description: This article helps you troubleshoot slow page response and hang issues.
4
-
ms.date: 03/06/2025
4
+
ms.date: 03/21/2025
5
5
ms.custom: sap:Site Behavior and Performance\Slow page response
6
6
ms.reviewer: khgupta, v-sidong
7
7
---
@@ -41,7 +41,7 @@ Page slowness and hangs might be accompanied by one or more of the following con
41
41
42
42
[Overview of high memory consumption issues](high-memory-consumption-issues-overview.md)
43
43
44
-
## What and how to collect
44
+
## Data collection
45
45
46
46
Here's a list of useful data to collect for a slow page response or hang situation. Not all of these data is required for each issue. You can collect data depending on the situation.
47
47
@@ -116,11 +116,11 @@ Failed Request Tracing is an IIS module. It's available for use when the Tracing
116
116
Add-WindowsFeature -Name Web-Http-Tracing
117
117
```
118
118
119
-
Before [configuring a FREB Rule](../health-diagnostic-performance/troubleshoot-arr-using-frt-rules.md#step-1-configure-failed-request-tracing-rules), inspect the W3SVC logs to identify requests that take a long time to complete. Identify individual page requests that are slow using the `cs-uri-stem` and the `time-taken` fields.
119
+
Before configuring a FREB rule, inspect the W3SVC logs to identify requests that take a long time to complete. Identify individual page requests that are slow using the `cs-uri-stem` and the `time-taken` fields.
120
120
121
-
- If you can identify a few specific pages that are slow, [create a FREB Rule](../health-diagnostic-performance/troubleshoot-arr-using-frt-rules.md#step-1-configure-failed-request-tracing-rules) for the specific page or pages. If creating the rule for a specific page, don't use time taken in the FREB Rule. Instead, use the status code from the W3SVC logs.
121
+
- If you can identify a few specific pages that are slow, [create a FREB rule](../health-diagnostic-performance/troubleshoot-arr-using-frt-rules.md#step-1-configure-failed-request-tracing-rules) for the specific page or pages. If creating the rule for a specific page, don't use time taken in the FREB rule. Instead, use the status code from the W3SVC logs.
122
122
123
-
- If you can't identify a specific page to create the FREB rule, you can use all content and specify a time taken in the FREB rule instead, which gives you logs of all requests that take more than the specified time to complete.
123
+
- If you can't identify a specific page to create the FREB rule, you can use all content and [specify a time taken in the FREB rule](#detailed-steps-for-collecting-freb-logs-based-on-time-taken) instead, which gives you logs of all requests that take more than the specified time to complete.
124
124
125
125
> [!NOTE]
126
126
> This method might give you false positives. Also note that when creating FREB logs based on time taken, the log ends when the request reaches the specified time taken. If the specified time is too short, you aren't able to identify where the slowness occurs.
@@ -135,23 +135,23 @@ Before [configuring a FREB Rule](../health-diagnostic-performance/troubleshoot-a
135
135
- If the response is received after some delay (for example, 30 seconds), follow these steps to diagnose the issue:
136
136
137
137
1. Check the status code of the received response.
138
-
138
+
139
139
Use browser developer tools or IIS logs to determine the status code of the delayed response.
140
140
141
-
1.[Configure FREBs](troubleshoot-http-error-code.md#steps-to-capture-freb-logs) based on that status code.
141
+
1.[Configure FREBs](troubleshoot-http-error-code.md#steps-to-capture-freb-logs) based on the status code in step 1.
142
142
1. View the generated FREBs to understand which module causes the slowness.
143
143
144
-
If you aren't familiar with how to interpret FREBs, section [Interpreting a FREB tracing log]() in this link helps.
144
+
If you aren't familiar with how to interpret FREBs, see [Reading a FREB log, a Failed Request Tracing: IIS request processing pipeline execution](https://techcommunity.microsoft.com/blog/iis-support-blog/reading-a-freb-log-a-failed-request-tracing-iis-request-processing-pipeline-exec/1349639).
145
145
146
146
If you find that some third-party module is causing the slowness, contact the third-party to investigate the problem. However, if the slowness is due to your application code, you need to collect memory dumps for further investigation.
147
147
148
148
- If no response is received at all (complete hang) or received after a very long time, follow these steps to diagnose the issue:
149
149
150
-
1.[Configure FREBs](troubleshoot-http-error-code.md#steps-to-capture-freb-logs) based on a specific time taken rule.
150
+
1.[Configure FREBs based on a specific time taken rule](#detailed-steps-for-collecting-freb-logs-based-on-time-taken).
151
151
152
152
The time threshold you set for FREB logs should be beyond what is considered normal or acceptable. if you know that it's normal and expected for a response to take 10 seconds, configure FREBs to 20 seconds, 30 seconds, or some other number.
153
153
154
-
1. Proceed with the same analysis steps as mentioned previously.
154
+
1. Proceed with the same analysis steps as mentioned above.
155
155
156
156
#### The issue is intermittent or hard to reproduce
157
157
@@ -167,6 +167,51 @@ You can [use PerfView to collect ETW traces](troubleshoot-http-error-code.md#ste
167
167
168
168
Always check IIS logs for very slow requests and troubleshoot them, as this might indirectly solve shorter slowness issues.
169
169
170
+
#### Detailed steps for collecting FREB logs based on time taken
171
+
172
+
> [!IMPORTANT]
173
+
> To configure FREB logs, make sure the **Tracing** role service is installed for IIS.
174
+
175
+
To install the **Tracing** role service for IIS, follow these steps:
176
+
177
+
[!INCLUDE [Install the Tracing role service](../../../../includes/enable-tracing-role.md)]
178
+
179
+
Once the **Tracing** role service is installed, follow these steps to capture FREB:
180
+
181
+
1. Open the **Run** command window.
182
+
1. Launch **inetmgr**.
183
+
1. In IIS Manager, under the **Connections** pane, expand the machine name, expand **Sites**, and then select the target website.
184
+
185
+
:::image type="content" source="media/slow-page-response-hangs/iis-connection-site-target-website.png" alt-text="Screenshot of the target website in IIS manager.":::
186
+
187
+
1. Double-click **Failed Request Tracing Rules**.
188
+
189
+
:::image type="content" source="media/slow-page-response-hangs/default-web-site-home.png" alt-text="Screenshot of the Default Web Site Home.":::
190
+
191
+
1. In the **Actions** pane, select **Add**.
192
+
1. In the **Add Failed Request Tracing Rule** wizard, on the **Specify Content to Trace** page, select **All content** > **Next**.
193
+
194
+
:::image type="content" source="media/slow-page-response-hangs/add-failed-request-tracing-rule.png" alt-text="Screenshot of the Specify Content to Trace page in the Add Failed Request Tracing Rule window.":::
195
+
196
+
1. On the **Define Trace Conditions** page, update the **Time taken** field as per the time that you're noticing the request or page is taking and select **Next**.
197
+
198
+
For example, if the request, usually takes less than a second, but now it's taking 20 seconds, type **20** in the **Time Taken** field.
199
+
200
+
1. On the **Select Trace Providers** page, under **Providers**, select all the checkboxes. Under **Areas**, make sure all the checkboxes are selected for each provider. Under **Verbosity**, select **Verbose**. Select **Finish**.
201
+
202
+
1. Enable **Failed Request Tracing** for the site and configure the Log File Directory:
203
+
204
+
1. In the **Connections** pane, expand the machine name, expand **Sites**, and then select **Default Web Site**.
205
+
1. In the **Actions** pane, under **Configure**, select **Failed Request Tracing**.
206
+
207
+
:::image type="content" source="media/slow-page-response-hangs/configure-failed-request-tracing.png" alt-text="Screenshot of the Failed Request Tracing option.":::
208
+
209
+
1. In the **Edit Web Site Failed Request Tracing Settings** dialog, select the **Enable** checkbox, set the **Directory** field to **%SystemDrive%\inetpub\logs\FailedReqLogFiles**, and set **Maximum number of trace files** to **1000**.
210
+
211
+
:::image type="content" source="media/slow-page-response-hangs/edit-website-failed-request-tracing-settings.png" alt-text="Screenshot of the Edit Web Site Failed Request Tracing Settings window.":::
212
+
213
+
1. Select **OK**.
214
+
170
215
### Full user-mode process dump
171
216
172
217
A series of process dumps (2-4) taken when requests are slow or hung might tell you which method call in the application is slow. It might also indicate delays in remote requests to remote web services or back-end databases.
@@ -177,16 +222,9 @@ If the issue can be reproduced or currently occurs, you can capture several manu
177
222
178
223
Try to space dumps about 30 seconds apart, but be mindful of the total slowness. If the total period of slowness is shorter (for example, 20 to 30 seconds total), space dumps closer together to fit at least two dumps inside the slow period.
179
224
180
-
Feel free to use and send [email template]().
181
-
182
225
Optionally, ProcDump can be used, especially when you can't install DebugDiag on the server or installation requires it.
183
226
184
-
If the issue is more intermittent, consider [capturing both FREB traces and dumps using ProcDump](#configure-freb-to-trigger-memory-dumps-using-procdumpexe) (set up FREB for time taken rather than status code).
185
-
186
-
Use this [email template]() for setting up FREB.
187
-
188
-
> [!NOTE]
189
-
> Some of these [email templates]() instruct you to collect Perfmon traces as well. It's advised to skip that step for now and collect later if absolutely determined to be necessary.
227
+
If the issue is more intermittent, consider capturing both FREB traces and dumps or if using ProcDump is easier, follow this article (set up FREB for time taken rather than status code).
190
228
191
229
#### Issue isn't easily reproduced
192
230
@@ -197,9 +235,8 @@ If the issue isn't easily reproduced, you can use FREB Rule to generate dumps ba
197
235
198
236
#### Deadlock detected hangs
199
237
200
-
In a case where a hang correlates with **Deadlock detected** in Application event logs, use this [email template]().
201
-
202
238
> [!CAUTION]
239
+
>
203
240
> - If slowness is accompanied by high CPU, avoid collecting logs when CPU usage is extremely high (for example, >=95), as this might cause the server to hang or fail to collect logs due to insufficient CPU resources.
204
241
>
205
242
> - If collecting logs manually, make sure CPU usage is lower than the threshold to facilitate RDP access to the server. If needed, try recycling the application pool before logs collection, but be aware of the impact on existing requests and explain that to customers.
@@ -291,9 +328,25 @@ For more information, see [Using RSCA to help you understand what your IIS serve
291
328
292
329
If the slowness is confirmed, take the memory dumps manually. However, this doesn't guarantee that the dumps contain the same problematic request during its lifetime and hence multiple attempts might be needed if dumps are taken manually (even when automated, sometimes multiple attempts are needed).
293
330
294
-
To take the memory dumps manually, see [Method 2: Using DebugDiag](data-capture-managed-memory-leak.md#method-2-using-debugdiag).
331
+
To take the memory dumps manually, follow these steps:
332
+
333
+
1. Download and install [Debug Diagnostic Tool v2 Update 3.2](https://www.microsoft.com/download/details.aspx?id=103453).
334
+
1. When a memory leak occurs, open **DebugDiag 2 Collection** from the **Start** menu:
335
+
336
+
:::image type="content" source="media/slow-page-response-hangs/debugdiag-2-collection.png" alt-text="Screenshot of DebugDiag 2 Collection.":::
337
+
338
+
> [!NOTE]
339
+
> If you need to change the path where dumps are generated, select **Tools** > **Options And Settings** > **Manual Userdump Save Folder** to change it.
340
+
1. Select the **Processes** tab.
341
+
1. Locate the **w3wp** process with the **Process ID** column of the application in question.
342
+
[!INCLUDE [How to get actual PID](../../../../includes/how-get-pid.md)]
343
+
1. Right-click the **w3wp** process, select **Create Userdump Series**, and set the following options (adjust the numbers as needed). Don't select **Save & Close**.
344
+
345
+
:::image type="content" source="media/slow-page-response-hangs/configure-userdump-series.png" alt-text="Screenshot of Configure UserDump Series.":::
346
+
347
+
1. Reproduce the slowness and select **Save & Close** when the requests are slow.
295
348
296
-
If you know how to reproduce the slowness, do so and select **Save & Close** when the requests are slow. If you don't know how to reproduce the slowness and it occurs quickly and frequently, wait for the slowness to begin before selecting **Save & Close**. Dumps begin collecting as soon as **Save & Close** is selected.
349
+
If you don't know how to reproduce the slowness and it occurs quickly and frequently, wait for the slowness to begin before selecting **Save & Close**. Dumps begin collecting as soon as **Save & Close** is selected.
297
350
298
351
### Configure FREB to trigger memory dumps using ProcDump.exe
299
352
@@ -303,7 +356,7 @@ Follow these steps to configure FREB to run a custom action, like **ProcDump.exe
303
356
304
357
1. Configure FREB based on request time value:
305
358
306
-
Configure FREBs on the appropriate request time value by following the steps in [Time trigger amount](#time-trigger-amount). Make sure to set a time-taken rule instead of a status code. For detailed steps on configuring FREBs, see [Steps to capture FREB logs](troubleshoot-http-error-code.md#steps-to-capture-freb-logs).
359
+
[Configure FREBs on the appropriate request time value](#detailed-steps-for-collecting-freb-logs-based-on-time-taken). Make sure to set a time-taken rule instead of a status code.
0 commit comments