简体   繁体   English

如何处理 Azure 应用服务中的性能问题

[英]How to handle the performance issue in Azure app service

I have hosted Api in azure app service.我在 azure 应用服务中托管了 Api。

IT was working fine but now after hitting the API it is returning status code as 502 with message它工作正常,但现在在点击 API 后,它返回状态代码为 502 并显示消息

The specified CGI application encountered an error and the server terminated the process.

I have restarted the app service and it started working fine but this is happening frequently.我已经重新启动了应用程序服务,它开始正常工作,但这种情况经常发生。

Is there a way to get alerts or have an automatic restart of app service if this is happening frequently or any other suggestions.如果这种情况经常发生或有任何其他建议,是否有办法获得警报或自动重启应用服务。

This is I found in the Azure performance这是我在 Azure 性能中找到的

在此处输入图像描述

Any suggestion is appreciatable.任何建议都是值得赞赏的。 Thanks for the help谢谢您的帮助

Main reasons for this type of error in app service are:应用服务出现此类错误的主要原因是:

  • requests taking a long time请求需要很长时间
  • application using high memory/CPU使用高内存/CPU 的应用程序
  • application crashing due to an exception.应用程序因异常而崩溃。

For troubleshooting see: https://docs.microsoft.com/en-us/azure/app-service/troubleshoot-http-502-http-503有关故障排除,请参阅: https://docs.microsoft.com/en-us/azure/app-service/troubleshoot-http-502-http-503

For autorestarting Azure web site see: https://azure.microsoft.com/nb-no/blog/auto-healing-windows-azure-web-sites/对于自动重启 Azure web 站点,请参见: https://azure.microsoft.com/nb-no/blog-web-healing-window

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM