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/containers/tutorial-troubleshoot-monitor.md
+13-11Lines changed: 13 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,17 +106,21 @@ Select the first two images and click `convert`. This will convert successfully.
106
106
107
107
### Break the app
108
108
109
-
Now that you've verified the app by converting two images successfully, we'll try to convert the first five images. This action fails and produces a `HTTP 500` error that wasn't tested during development.
109
+
Now that you've verified the app by converting two images successfully, we'll try to convert the first five images.
110
+
111
+

112
+
113
+
This action fails and produces a `HTTP 500` error that wasn't tested during development.
110
114
111
115

112
116
113
117
## Use log query to view Azure Monitor logs
114
118
115
119
Let's see what logs are available in the Log Analytics workspace.
116
120
117
-
Click this [Log Analytics workspace link](https://ms.portal.azure.com/#blade/HubsExtension/BrowseResourceBlade/resourceType/Microsoft.OperationalInsights%2Fworkspaces) to access your workspace in the Azure Portal.
121
+
Click this [Log Analytics workspace link](https://ms.portal.azure.com/#blade/HubsExtension/BrowseResourceBlade/resourceType/Microsoft.OperationalInsights%2Fworkspaces) to access your workspace in the Azure portal.
118
122
119
-
In the Azure Portal, select your Log Analytics workspace.
123
+
In the Azure portal, select your Log Analytics workspace.
120
124
121
125
### Log queries
122
126
@@ -136,7 +140,7 @@ Now that we've accessed the app, let's view the data associated with HTTP reques
136
140
137
141
3. Click `Run`.
138
142
139
-

143
+

140
144
141
145
The `AppServiceHTTPLogs` query returns all requests in the past 24-hours. The column `ScStatus` contains the HTTP status. To diagnose the `HTTP 500` errors, limit the `ScStatus` to 500 and run the query, as shown below:
Now that you've confirmed the HTTP 500s, let's take a look at the standard output/errors from the app. These logs are found in `AppServiceConsoleLogs'.
@@ -168,7 +170,7 @@ In the `ResultDescription` column, you'll see the following error:
168
170
169
171
```
170
172
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted
171
-
(tried to allocate 16384 bytes) in /home/site/wwwroot/process.php on line 17,
173
+
(tried to allocate 16384 bytes) in /home/site/wwwroot/process.php on line 20,
172
174
referer: http://<app-name>.azurewebsites.net/
173
175
```
174
176
@@ -181,7 +183,7 @@ Now that you've identified both HTTP 500s and standard errors, you need to confi
181
183
>
182
184
> - Filters HTTPLogs for 500 errors
183
185
> - Queries console logs
184
-
> - Joins the tables based on `TimeGenerated`
186
+
> - Joins the tables on `TimeGenerated`
185
187
>
186
188
187
189
Run the following query:
@@ -198,15 +200,15 @@ In the `ResultDescription` column, you'll see the following error at the same ti
198
200
199
201
```
200
202
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted
201
-
(tried to allocate 16384 bytes) in /home/site/wwwroot/process.php on line 17,
203
+
(tried to allocate 16384 bytes) in /home/site/wwwroot/process.php on line 20,
202
204
referer: http://<app-name>.azurewebsites.net/
203
205
```
204
206
205
-
The message states memory has been exhausted on line 17 of `process.php`. You've now confirmed that the application produced an error during the HTTP 500 error. Let's take a look at the code to identify the problem.
207
+
The message states memory has been exhausted on line 20 of `process.php`. You've now confirmed that the application produced an error during the HTTP 500 error. Let's take a look at the code to identify the problem.
206
208
207
209
## Identify the error
208
210
209
-
In the local directory, open the `process.php` and look at line 17.
211
+
In the local directory, open the `process.php` and look at line 20.
0 commit comments