如何重启 Azure 应用服务实例 [英] How to restart Azure App Service Instance

查看:33
本文介绍了如何重启 Azure 应用服务实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Azure 应用服务,其中包含 1 个带有 1 个插槽的 Web 应用.我有 2 个实例分配给应用服务.本周,应用服务显示大约 60% 的 CPU 使用率,通常在 10-15% 左右.经过进一步调查,看起来两个实例中的 1 个实例已被最大化.打开每个实例的站点指标时,我可以看到一个实例的 HTTP 响应时间在 1000 毫秒内,而另一个实例则不到 200 毫秒.我已经尝试在有问题的实例上重新启动 W3P 进程,但这似乎没有帮助.我也尝试过扩展到其他实例.新实例看起来不错,但是当我缩小规模时,结构不会杀死有问题的实例.

I have an Azure App Service that contains 1 Web App with 1 slot. I have 2 instances assigned to the App Service. This week, the App Service shows about 60% CPU usage, and its usually about 10-15%. Upon further investigation, it looks like 1 of the two instances is maxed out. When opening up the Site Metrics per Instance, I can see that HTTP Response times are in the 1000s of milliseconds for one instance, and less than 200ms for the other. I have tried restarting the W3P process on the offending instance, but that doesn't seem to help. I have also tried scaling up to additional instances. The new instances look good, but when I scale back down, the fabric won't kill the offending instance.

如何强制结构控制器终止特定实例?

我在这里找到了 AzureRestartRole powershell 命令 (https://msdn.microsoft.com/en-us/library/azure/dn495202.aspx),但我的 Azure Powershell 命令提示符似乎无法识别该命令,因此我尝试使用 install-module 命令升级到 Azure SDK 1.3,但未找到AzureRestartRole"命令.

I found the AzureRestartRole powershell command here (https://msdn.microsoft.com/en-us/library/azure/dn495202.aspx), but my Azure Powershell Command Prompt doesn't seem to recognize the command, so I tried upgrading to Azure SDK 1.3 with the install-module command, but the 'AzureRestartRole' command isn't found.

推荐答案

我最近遇到了一个类似的问题(一个错误的实例总是从 ConfigurationManager.AppSettings 读取 null 而另一个实例很好).我发现从 Azure 门户重新启动 Azure 应用服务(Web 应用)的特定实例是可行的.:D

I recently encounter a similar issue (one bad instance always read null from ConfigurationManager.AppSettings while the other instance was fine). I found that restarting a particular instance of a Azure App service (web app) is do-able from the Azure portal. :D

2019 年 8 月 16 日更新:

简短的版本是,如果您在 Diagnose and Solve Problems 下进入 Web 应用程序的门户,搜索 Advanced Application Restart,您将获得一个选项允许您只选择您想要的实例.

The short version is that if you go in the portal for your web app under Diagnose and Solve Problems, search for Advanced Application Restart and you will get an option that allows you to pick just the instance you want.

希望对您有所帮助.

这篇关于如何重启 Azure 应用服务实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆