locked
Time Out After 230 seconds RRS feed

  • Question

  • Hi there

    I have a long running script on my Web App that is timing out after 230 seconds - always after 230 seconds.

    The error is "500 - the request timed out - the web service failed to respond within the specified time.

    I have tried setting the SCM_COMMAND_IDLE_TIMEOUT to 600 in the portal but this hasn't helped. I have also tried adding this value to the appSettings in the web.config but this hasn't made any difference.

    Have also tried setting the following within my script but this also hasn't made any difference.

    Server.ScriptTimeout = 600;

    Can anyone help please ?


    Thanks

    Sunday, April 17, 2016 8:04 PM

Answers

  • 230 seconds is the maximum amount of time that a request can take without sending any data back to the response. It is not configurable.

    If sending data back to keep it alive is not feasible, the suggested approach is to move to an async pattern. i.e.

    • First request starts the script and returns an http 202
    • Subsequent requests from client check the work, and eventually return 200 when it's done.
    Sunday, April 17, 2016 10:10 PM

All replies

  • 230 seconds is the maximum amount of time that a request can take without sending any data back to the response. It is not configurable.

    If sending data back to keep it alive is not feasible, the suggested approach is to move to an async pattern. i.e.

    • First request starts the script and returns an http 202
    • Subsequent requests from client check the work, and eventually return 200 when it's done.
    Sunday, April 17, 2016 10:10 PM
  • Hi David,

    Is there any change in this behavior? The reason I ask is because this is a very old post.

    Thanks

    Friday, July 20, 2018 9:55 AM
  • @sumits_systango

    Yes, it still holds true. The request timeout cannot be increased. The suggested approach is to move to an async pattern.

    You may want to refer the feedback page for more details.

    ------------------------------------------------------------------------------------------
    If this answer was helpful, click “Mark as Answer” or “Up-Vote”. To provide additional feedback on your forum experience, click here.

    Tuesday, July 24, 2018 6:12 PM
  • Follow-up question.  Does your recommendation change when the action that's timing out is a large file upload that takes longer than 230 seconds to even upload from the web client? 

    Currently we have the web browser uploading a file to the azure web app with a normal uploader. Then the web app kicks off a storage queue request to process the file with an async pattern like described above.  But we're running into timeouts getting the file uploaded to the Azure web app.

    We were considering using your Azure Storage JavaScript Client Library with SAS tokens to upload directly from the client to Azure Storage.  Are there any other options you'd recommend?

    https://dmrelease.blob.core.windows.net/azurestoragejssample/samples/sample-blob.html

    Wednesday, August 1, 2018 2:13 PM
  • @Joel: the 230s timeout is an idle connection timeout. So it should not come into play when actively uploading a file with data constantly flowing.

    If you're running into an issue in such scenario, it is probably not related.

    David

    Wednesday, August 1, 2018 6:16 PM