Skip to content

Commit f6af0ee

Browse files
committed
acro
1 parent 6f09002 commit f6af0ee

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

articles/app-service/tutorial-troubleshoot-monitor.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
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.
44
author: msangapu-msft
55
ms.author: msangapu
66
ms.topic: tutorial
@@ -9,7 +9,7 @@ ms.date: 06/20/2020
99
---
1010
# Tutorial: Troubleshoot an App Service app with Azure Monitor
1111

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).
1313

1414
[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.
1515

@@ -26,7 +26,7 @@ You can follow the steps in this tutorial on macOS, Linux, Windows.
2626

2727
## Prerequisites
2828

29-
To complete this tutorial, you'll need:
29+
To complete this tutorial, you need:
3030

3131
- [Azure subscription](https://azure.microsoft.com/free/?ref=microsoft.com&utm_source=microsoft.com&utm_medium=docs&utm_campaign=visualstudio)
3232

@@ -36,7 +36,7 @@ To complete this tutorial, you'll need:
3636

3737
## Create Azure resources
3838

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.
4040

4141
```azurecli
4242
az group create --name myResourceGroup --location "South Central US"
@@ -55,7 +55,7 @@ git push azure main
5555

5656
### Create a Log Analytics Workspace
5757

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.
5959

6060
In this step, you create a Log Analytics workspace to configure Azure Monitor with your app.
6161

@@ -93,21 +93,21 @@ az monitor diagnostic-settings create --resource $resourceID \
9393

9494
Browse to `http://<app-name>.azurewebsites.net`.
9595

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 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.
9797

9898
### Verify the app works
9999

100100
To convert images, click `Tools` and select `Convert to PNG`.
101101

102102
![Click `Tools` and select `Convert to PNG`](./media/tutorial-azure-monitor/sample-monitor-app-tools-menu.png)
103103

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.
105105

106106
![Select the first two images](./media/tutorial-azure-monitor/sample-monitor-app-convert-two-images.png)
107107

108108
### Break the app
109109

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.
111111

112112
![Convert first five images](./media/tutorial-azure-monitor/sample-monitor-app-convert-five-images.png)
113113

@@ -165,7 +165,7 @@ AppServiceConsoleLogs |
165165
where ResultDescription contains "error"
166166
```
167167

168-
In the `ResultDescription` column, you'll see the following error:
168+
In the `ResultDescription` column, you see the following error:
169169

170170
```output
171171
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.
213213
imagepng($imgArray[$x], $filename);
214214
```
215215

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.
217217

218218
## Fix the app
219219

0 commit comments

Comments
 (0)