增加Azure Web应用程序请求超时 [英] Increase azure web app request timeout

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

问题描述

有什么方法可以增加Azure Web应用程序的请求超时时间吗?

Is there any way to increase the request timeout for azure web apps?

如果我将请求延迟了2分钟以上,所以请求失败,没有错误(返回空白页)或模糊的503响应.

If I delay the request by anything over 2 minutes or so the request fails with no error (blank page returned) or a vague 503 response.

    public ActionResult Index()
    {
        System.Threading.Thread.Sleep(230000);
        return View();
    }

我有一些需要长时间运行的请求(上传大文件/大pdf转换作业)-有什么办法可以解决?我希望避免使用VM托管.我曾尝试将Web应用程序扩展到基本计划或标准计划,但似乎没有任何区别.

I have some long running requests that I need to run (uploading large files/large pdf conversion jobs) - is there any way around this? I'd prefer to avoid using VM hosting is possible. I've tried scaling the web app to basic or standard plans, but it doesn't seem to make any difference.

推荐答案

否,您不能增加Azure App Services的超时时间(230秒).您可以移至对这些设置拥有控制权的VM上托管的云服务或IIS.您还可以移至一个异步模型,在该模型中,客户端发出请求,获取某种票证或标识符,这些票证或标识符可以回传以查看处理是否完成.您可以从中选择许多用于Web应用程序的异步类型模型的示例. 参考: https://social.msdn.microsoft.com/Forums/zh-CN/05f254a6-9b34-4eb2-a5f7-2a82fb40135f/time-out-after-230-seconds?forum=windowsazurewebsitespreview

No, you cannot increase the timeout for Azure App Services (it is 230 seconds). You can move to a cloud services or IIS hosted on a VM where you have control over those settings. You can also move to an async model where the client makes a request, gets some sort of ticket or identifier that is can poll back to see if the processing is done. There are many examples of async type models for web apps out there you can choose from. Ref:https://social.msdn.microsoft.com/Forums/en-US/05f254a6-9b34-4eb2-a5f7-2a82fb40135f/time-out-after-230-seconds?forum=windowsazurewebsitespreview

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

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