Skip to content

Commit f5bee2a

Browse files
authored
Merge pull request #106666 from Blackmist/http-status-codes
adding info on 502 and 504 status codes
2 parents 8e29a51 + d76a5af commit f5bee2a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

articles/machine-learning/how-to-troubleshoot-deployment.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,10 @@ def run(input_data):
216216

217217
**Note**: Returning error messages from the `run(input_data)` call should be done for debugging purpose only. For security reasons, you should not return error messages this way in a production environment.
218218

219+
## HTTP status code 502
220+
221+
A 502 status code indicates that the service has thrown an exception or crashed in the `run()` method of the score.py file. Use the information in this article to debug the file.
222+
219223
## HTTP status code 503
220224

221225
Azure Kubernetes Service deployments support autoscaling, which allows replicas to be added to support additional load. However, the autoscaler is designed to handle **gradual** changes in load. If you receive large spikes in requests per second, clients may receive an HTTP status code 503.
@@ -257,6 +261,12 @@ There are two things that can help prevent 503 status codes:
257261

258262
For more information on setting `autoscale_target_utilization`, `autoscale_max_replicas`, and `autoscale_min_replicas` for, see the [AksWebservice](https://docs.microsoft.com/python/api/azureml-core/azureml.core.webservice.akswebservice?view=azure-ml-py) module reference.
259263

264+
## HTTP status code 504
265+
266+
A 504 status code indicates that the request has timed out. The default timeout is 1 minute.
267+
268+
You can increase the timeout or try to speed up the service by modifying the score.py to remove unnecessary calls. If these actions do not correct the problem, use the information in this article to debug the score.py file. The code may be in a hung state or an infinite loop.
269+
260270
## Advanced debugging
261271

262272
In some cases, you may need to interactively debug the Python code contained in your model deployment. For example, if the entry script is failing and the reason cannot be determined by additional logging. By using Visual Studio Code and the Python Tools for Visual Studio (PTVSD), you can attach to the code running inside the Docker container.

0 commit comments

Comments
 (0)