gpt4 book ai didi

azure - 为什么我在 Azure 应用服务中每 5 分钟收到一个错误请求

转载 作者:行者123 更新时间:2023-12-02 05:52:41 25 4
gpt4 key购买 nike

我在 Azure 上有一个 Java Web 应用程序,我在它的 Application Insights 中收到失败的请求。看起来有人每 5 分钟调用一次“http://myApp.azurewebsites.net/error”,但我没有这个接口(interface),因此 Application Insights 中有很多失败的 404 请求。然后我在app中添加了这个接口(interface),但是仍然有很多404代码的失败请求。我不知道这些请求,我不知道他们来自哪里,也不知道他们想做什么。我在应用程序中设置了错误的配置吗?

最佳答案

这是由于您的 AppService 的配置/常规设置下的“始终开启”被开启导致的。

根据the docs :

Always On: Keeps the app loaded even when there's no traffic. When Always On is not turned on (default), the app is unloaded after 20 minutes without any incoming requests. The unloaded app can cause high latency for new requests because of its warm-up time. When Always On is turned on, the front-end load balancer sends a GET request to the application root every five minutes. The continuous ping prevents the app from being unloaded.

为了减轻影响,您可以添加处理默认路由的 Controller /操作。

关于azure - 为什么我在 Azure 应用服务中每 5 分钟收到一个错误请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68664319/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com