Azure ASP .net WebApp The request timed out

前端 未结 2 1303
轮回少年
轮回少年 2020-11-27 15:01

I have deployed an ASP .net MVC web app to Azure App service.

I do a GET request from my site to some controller method which gets data from DB(DbContext). Sometime

相关标签:
2条回答
  • 2020-11-27 15:26

    230 seconds. That's it. That's the in-flight request timeout in Azure App Service. It's hardcoded in the platform so TCP keep-alives or not you're still bound by it.

    Source -- see David Ebbo's answer here:
    https://social.msdn.microsoft.com/Forums/en-US/17305ddc-07b2-436c-881b-286d1744c98f/503-errors-with-large-pdf-file?forum=windowsazurewebsitespreview

    There is a 230 second (i.e. a little less than 4 mins) timeout for requests that are not sending any data back. After that, the client gets the 500 you saw, even though in reality the request is allowed to continue server side.

    Without knowing more about your application it's difficult to suggest a different approach. However what's clear is that you do need a different approach --

    Maybe return a 202 Accepted instead with a Location header to poll for the result later?

    0 讨论(0)
  • 2020-11-27 15:37

    I just changed my Azure Web Site from Shared Enviroment to Standard, and it works.

    0 讨论(0)
提交回复
热议问题