【Azure 应用服务】Azure Function App在部署时候遇见 503 ServiceUnavailable

简介: 【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服务。

相关文章
|
23天前
|
存储 Linux 开发工具
【Azure App Service】本地Git部署Python Flask应用上云(Azure App Service For Linux)关键错误
【Azure App Service】本地Git部署Python Flask应用上云(Azure App Service For Linux)关键错误
|
23天前
【Azure Function】Azure Function中的Timer Trigger无法自动触发问题
【Azure Function】Azure Function中的Timer Trigger无法自动触发问题
|
23天前
【Azure Function & Application Insights】在Azure Function的日志中,发现DrainMode mode enabled Traces。它是什么意思呢?
【Azure Function & Application Insights】在Azure Function的日志中,发现DrainMode mode enabled Traces。它是什么意思呢?
|
23天前
|
缓存
【Azure Function】Function App代码中使用Managed Identity认证获取Blob数据时遇见400报错
【Azure Function】Function App代码中使用Managed Identity认证获取Blob数据时遇见400报错
【Azure Function】Function App代码中使用Managed Identity认证获取Blob数据时遇见400报错
|
23天前
|
Python
【Azure Function】发布 Python Function 到 Azure 成功,但是无法显示Function列表
【Azure Function】发布 Python Function 到 Azure 成功,但是无法显示Function列表
|
23天前
|
Java 应用服务中间件 nginx
【Azure Spring Apps】Spring App部署上云遇见 502 Bad Gateway nginx
【Azure Spring Apps】Spring App部署上云遇见 502 Bad Gateway nginx
|
23天前
|
C#
【Azure Function】Function App启动时出现 Failed to open local port 4001 错误,这是什么情况呢?
【Azure Function】Function App启动时出现 Failed to open local port 4001 错误,这是什么情况呢?
|
23天前
|
C# C++
【Azure Function】在VS Code中创建Function项目遇见 No .NET worker runtimes found
【Azure Function】在VS Code中创建Function项目遇见 No .NET worker runtimes found
|
23天前
【Azure Function & Application Insights】调用Function上传和下载文件,有时候遇见大于1MB的文件的日志没有记录在Application Insights中
【Azure Function & Application Insights】调用Function上传和下载文件,有时候遇见大于1MB的文件的日志没有记录在Application Insights中
|
23天前
|
API C++ Python
【Azure Function】示例运行 python durable function(model V2)
【Azure Function】示例运行 python durable function(model V2)