如何增加 Azure 应用服务 230 秒请求超时 [英] How can increase Azure App Service 230 sec request time out

查看:15
本文介绍了如何增加 Azure 应用服务 230 秒请求超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Azure 应用服务上托管了一个 Asp.NET MVC 应用程序.我收到超过 230 秒的超时异常.如何在 Azure App Service 上增加它?

I have hosted an Asp.NET MVC application on Azure App Service. I am getting a timeout exception which elapsed more than 230 seconds. How can increase it on Azure App Service?

推荐答案

据我所知,230 秒是一个请求在不向响应发送回任何数据的情况下可以花费的最长时间.

As far as I know, 230 seconds is the maximum amount of time that a request can take without sending any data back to the response.

我们无法在 azure web 应用中增加它.

We couldn't increase it in azure web app.

这里有两个解决方法.

一个是您可以将您的应用程序移动到云服务或创建一个您可以控制这些设置的虚拟机.

One is you could move your application to a cloud service or created a VM where you have control over those settings.

另一种方式,您也可以在 MVC 中使用异步模式.

Another way, you could also use async pattern in MVC.

例如:

首先,您可以向 MVC 发送请求,告诉服务器开始工作并返回 http 202.

Firstly, you could send the request to the MVC to tell the server start to work and returns an http 202.

然后您可以每隔几秒或几分钟从客户端发送请求以检查服务器的工作情况.如果它工作完全返回 200 告诉客户端已经完全.

Then you could send request every seconds or minutes from client to check the server work. If it works completely return 200 to tell the client has already completely.

这篇关于如何增加 Azure 应用服务 230 秒请求超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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