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: articles/app-service/tutorial-troubleshoot-monitor.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: 'Tutorial: Troubleshoot with Azure Monitor'
3
-
description: Learn how Azure Monitor and Log Analytics helps you monitor your App Service web app. Azure Monitor maximizes the availability by delivery a comprehensive solution for monitoring your environments.
3
+
description: Learn how Azure Monitor and Log Analytics help you monitor your App Service web app. Azure Monitor maximizes the availability by delivery a comprehensive solution for monitoring your environments.
4
4
author: msangapu-msft
5
5
ms.author: msangapu
6
6
ms.topic: tutorial
@@ -9,7 +9,7 @@ ms.date: 06/20/2020
9
9
---
10
10
# Tutorial: Troubleshoot an App Service app with Azure Monitor
11
11
12
-
This tutorial shows how to troubleshoot an [App Service](overview.md) app using [Azure Monitor](../azure-monitor/overview.md). The sample app includes code meant to exhaust memory and cause HTTP 500 errors, so you can diagnose and fix the problem using Azure Monitor. When you're finished, you'll have a sample app running on App Service on Linux integrated with [Azure Monitor](../azure-monitor/overview.md).
12
+
This tutorial shows how to troubleshoot an [App Service](overview.md) app using [Azure Monitor](../azure-monitor/overview.md). The sample app includes code meant to exhaust memory and cause HTTP 500 errors, so you can diagnose and fix the problem using Azure Monitor. When you're finished, you have a sample app running on App Service on Linux integrated with [Azure Monitor](../azure-monitor/overview.md).
13
13
14
14
[Azure Monitor](../azure-monitor/overview.md) maximizes the availability and performance of your applications and services by delivering a comprehensive solution for collecting, analyzing, and acting on telemetry from your cloud and on-premises environments.
15
15
@@ -26,7 +26,7 @@ You can follow the steps in this tutorial on macOS, Linux, Windows.
@@ -36,7 +36,7 @@ To complete this tutorial, you'll need:
36
36
37
37
## Create Azure resources
38
38
39
-
First, you run several commands locally to setup a sample app to use with this tutorial. The commands create Azure resources, create a deployment user, and deploy the sample app to Azure. You'll be prompted for the password supplied as a part of the creation of the deployment user.
39
+
First, you run several commands locally to set up a sample app to use with this tutorial. The commands create Azure resources, create a deployment user, and deploy the sample app to Azure. You're prompted for the password supplied as a part of the creation of the deployment user.
40
40
41
41
```azurecli
42
42
az group create --name myResourceGroup --location "South Central US"
@@ -55,7 +55,7 @@ git push azure main
55
55
56
56
### Create a Log Analytics Workspace
57
57
58
-
Now that you've deployed the sample app to Azure App Service, you'll configure monitoring capability to troubleshoot the app when problems arise. Azure Monitor stores log data in a Log Analytics workspace. A workspace is a container that includes data and configuration information.
58
+
Now that you've deployed the sample app to Azure App Service, you configure monitoring capability to troubleshoot the app when problems arise. Azure Monitor stores log data in a Log Analytics workspace. A workspace is a container that includes data and configuration information.
59
59
60
60
In this step, you create a Log Analytics workspace to configure Azure Monitor with your app.
The sample app, ImageConverter, converts included images from `JPG` to `PNG`. A bug has been deliberately placed in the code for this tutorial. If you select enough images, the the app produces a HTTP 500 error during image conversion. Imagine this scenario wasn't considered during the development phase. You'll use Azure Monitor to troubleshoot the error.
96
+
The sample app, ImageConverter, converts included images from `JPG` to `PNG`. A bug has been deliberately placed in the code for this tutorial. If you select enough images, the app produces an HTTP 500 error during image conversion. Imagine this scenario wasn't considered during the development phase. You'll use Azure Monitor to troubleshoot the error.
97
97
98
98
### Verify the app works
99
99
100
100
To convert images, click `Tools` and select `Convert to PNG`.
101
101
102
102

103
103
104
-
Select the first two images and click `convert`. This will convert successfully.
104
+
Select the first two images and click `convert`. This converts successfully.
105
105
106
106

107
107
108
108
### Break the app
109
109
110
-
Now that you've verified the app by converting two images successfully, we'll try to convert the first five images.
110
+
Now that you've verified the app by converting two images successfully, we try to convert the first five images.
111
111
112
112

113
113
@@ -165,7 +165,7 @@ AppServiceConsoleLogs |
165
165
where ResultDescription contains "error"
166
166
```
167
167
168
-
In the `ResultDescription` column, you'll see the following error:
168
+
In the `ResultDescription` column, you see the following error:
169
169
170
170
```output
171
171
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted
@@ -213,7 +213,7 @@ In the local directory, open the `process.php` and look at line 20.
213
213
imagepng($imgArray[$x], $filename);
214
214
```
215
215
216
-
The first argument, `$imgArray[$x]`, is a variable holding all JPGs (in-memory) needing conversion. However, `imagepng` only needs the image being converted and not all images. Pre-loading images is not necessary and may be causing the memory exhaustion, leading to HTTP 500s. Let's update the code to load images on-demand to see if it resolves the issue. Next, you will improve the code to address the memory problem.
216
+
The first argument, `$imgArray[$x]`, is a variable holding all JPGs (in-memory) needing conversion. However, `imagepng` only needs the image being converted and not all images. Pre-loading images is not necessary and may be causing the memory exhaustion, leading to HTTP 500s. Let's update the code to load images on-demand to see if it resolves the issue. Next, you improve the code to address the memory problem.
0 commit comments