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

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

问题描述

我已经在Azure App Service上托管了一个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.

这里有两种解决方法.

一种方法是,您可以将应用程序移至云服务或创建可以控制这些设置的VM.

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 App Service 230秒的请求超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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