Azure 函数获取 503

标签 azure azure-functions http-status-code-503

我正在尝试运行一个 Azure Function App,我们已经在不同的资源组/服务计划/存储帐户中运行该应用程序。原来的应用程序运行良好。但是当我尝试运行这个时,我得到了 503。

问题是我所知道的就是我收到了 503。没有其他信息。我在应用程序中打开了跟踪,但仍然没有收到任何消息。我尝试从 Azure Portal Function 应用程序代码/测试部分和 Postman 执行该应用程序,得到相同的结果。它旋转了很长时间,然后我得到了 503。

当我尝试执行该函数时,它在日志中显示以下内容:

Request successfully matched the route with name 'IngestRfidScan' and template 'api/v1/rfidScan'
Executing 'Functions.IngestRfidScan' (Reason='This function was programmatically called via the host APIs.', Id=a9c37c44-6a27-41e0-bff8-74fbb4275ecc)
Sending invocation id:a9c37c44-6a27-41e0-bff8-74fbb4275ecc
Posting invocation id:a9c37c44-6a27-41e0-bff8-74fbb4275ecc on workerId:7195f57f-b8ff-4613-84e4-9d4bc5dd7c4a

此后我没有看到任何日志消息。我尝试向应用程序添加日志记录,但我没有在任何地方的日志中看到我的消息。所以这让我相信它根本没有执行该功能。但我似乎找不到任何方法来确定原因。起初我认为这可能是防火墙问题,但我认为我不会在上面的日志中看到这些消息。

有什么想法如何诊断这个问题吗?

最佳答案

检查one of my workarounds了解Azure Functions 503服务不可用错误原因的原因。

It is definitely timing out. But I don't know why that is, I don't have enough info in the logs. I checked App Insights, but again, it just tells me the request is timing out, but no explanation.

我在上述解决方法引用中给出了超时限制,请检查该限制以及解决方案。

要获取日志/更多信息,您可以查看Azure Portal Function App中的诊断和解决问题菜单以及我的workaround显示了查看 Function App 和主机日志的不​​同方式。

关于Azure 函数获取 503,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73308055/

相关文章:

javascript - 使用 Azure Functions Core Tools 时如何解决 'Value cannot be null' 错误?

Heroku Go 应用崩溃

Python AmazonAPI 错误 503 服务不可用

Azure Devops Rest API 创建个人访问 token (PAT) -- patTokenError : userIdRequired

c# - 'Microsoft.Azure.Devices.Client'中的ReceiveAsync方法是否消耗互联网?

c# - 读取请求的内容 - ReadAsStringAsync()

html - 在 Firefox 中显示返回 HTTP 503 的图像

azure - 上传 Blob 时可以设置访问层吗?如果是,那么该怎么做呢?

c# - Azure Functions 运行时无法访问

azure - 如何使用 Bicep 在函数应用程序中组合动态设置和静态设置?