【Azure 应用服务】Azure Function App在部署时候遇见 503 ServiceUnavailable
问题描述
在VS Code中编写好 Azure Function App代码后,通过 func azure functionapp publish 部署失败,抛出 503 Service Unavailable 错误。
Getting site publishing info... Creating archive for current directory... Performing remote build for functions project. Deleting the old .python_packages directory
Uploading 160.35 KB [##############################################################################] Error Uploading archive... (ServiceUnavailable).
Server Response:
<div style="display: block; margin: auto; width: 600px; height: 500px; text-align: center; font-family: 'Courier', cursive, sans-serif;">
<h1 style="color: 747474">:( Application Error</h1>
<p style="color:#666">If you are the application administrator, you can access the
<a style="color: grey"href="https://<yourfunctionappname>.scm.chinacloudsites.cn/detectors">diagnostic resources</a>.
</div>
问题解答
当通过 func azure functionapp publish 部署本地代码到Azure上的时候,使用的是zip部署,调用的是Kudu站点的 https://<yourfunctionappname>.scm.chinacloudsites.cn/api/zipdeploy 接口。
当直接访问Function App的高级工具(kudu)站点时候,发现页面错误显示 Application Error。
这表示当前Azure Function的Kudu站点坏了,由于Kudu站点时默认创建的,当它不可用时,只有想办法重启/重建站点。
所以,解决方法为:
首先:重启Function App,如果重启不能让Kudu站点恢复正常,则进行下一步。
然后:缩放 或 升级 Function App的定价层,切换到一个新的实例(vm)来运行当前的Function服务。
当在复杂的环境中面临问题,格物之道需:浊而静之徐清,安以动之徐生。 云中,恰是如此!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?