none
Azure Web App - Request Timeout Issue RRS feed

  • Question

  • I have and MVC5 web-app running on Azure. Primarily this is a website but I also have a CRON job running (triggered from an external source) which calls a URL (a GET Request) to carry out some house keeping. This task is asynchronous can take up to and sometimes over the default timeout on Azure of 230 seconds. I'm regularly getting 500 errors due to this.

    Now, I've done a bit of reading and this looks like it's something to do with the Azure Load Balancer settings. I've also found some threads relating to being able to alter that timeout in various contexts but I'm wondering if anyone has experience in altering the Azure Load Balancer timeout in the context of a Web App? Is it a straightforward process?

    Wednesday, September 2, 2015 7:37 AM

Answers

All replies

  • Hello scgough,

    If you are using Azure VM or cloud Service, the load balancer is configurable, you can refer to the link below:

    http://azure.microsoft.com/en-us/blog/new-configurable-idle-timeout-for-azure-load-balancer/

    If this is an Azure website, go to Portal, select your site, CONFIGURE tab and add an AppSettings  SCM_COMMAND_IDLE_TIMEOUT  to say 3600 (this is in sec - so it is an hour etc.).

    Thanks,
    Syed Irfan Hussain

    Wednesday, September 2, 2015 2:22 PM
    Moderator
  • The SCM_COMMAND_IDLE_TIMEOUT set to 3600  doesn't work for my azure web app instance, azure still cut down my http request.
    Monday, May 23, 2016 7:38 AM
  • It does not appear to work on an App Service.
    Saturday, October 22, 2016 5:11 AM
  • The SCM_COMMAND_IDLE_TIMEOUT set to 3600  doesn't work for my azure web app instance, azure still cut down my http request.
    I'm also getting the 500 timeout after adding this to the appsettings for the webapp in azure
    Thursday, October 27, 2016 12:28 AM
  • I have added the same "SCM_COMMAND_IDLE_TIMEOUT set to 3600" yet it still times out after about 3-4 minutes. 

    Any further ideas?

    Tuesday, March 21, 2017 1:12 PM
  • Most people coming here are not using VM nor cloud service.. they are using Azure Web Apps.   If they were using azure vm or cloud service they would not be asking this questions, because as you point out, its entirely possible. 

    The real question is how to do this on Azure Web Apps?   how to keep alive the TCP connection during a 6minute running process, such as zipping up a folder, or running a backup via an APIcontroller in a webapp???

    Tuesday, April 4, 2017 11:12 PM
  • Any workaround? I'm having the same problem. 
    Monday, May 8, 2017 7:07 PM
  • Azure Web App frontend ARR has a timeout limit of 4 minutes. To the best of my knowledge, this is not configurable
    Wednesday, May 17, 2017 7:36 PM
  • The best way to avoid the 230 sec timeout is to use an Async function for long running process and in the meantime make a server call (may be an ajax call to get the response stream) every 3 mins (180 sec) to have server respond and keep the http connection alive.
    Thursday, August 3, 2017 12:40 PM