locked
Configuring runtime in web.config RRS feed

  • Question

  • User1300182079 posted

    How does  executionTimeout in web.config: <httpRuntime executionTimeout="250" targetFramework="4.7.1"/>
    Relate to 'Connection Time-out' in IIS?

    Thursday, October 26, 2017 3:48 PM

Answers

  • User1771544211 posted

    Hi arneG,

    The executionTimeout set the time you allow the request to execute before being automatically shut down by ASP.NET. The default is 110 seconds. Image that you have a large file to upload, it may take 5mins, so you need to set the executionTimeout to 300 or larger. Otherwise the request will be shutdown by the application.

    The connection Timeout set the time (in seconds) that IIS waits before it disconnects a connection that is considered inactive. The default value is 120sec.

    Image that you have a large file to upload, it may take 5mins and you have set the executionTimeout to 300 or larger. But the connection Timeout is still 120s. So the IIS will terminates the connection and show connection timeout  to the user.

    In general, the executionTimeout and connection Timeout both control the time that you limit the request to be handled. And the IIS connection timeout includes all the time that spend to handle this request including these time used by some IIS modules. The executionTimeout only controls the time that used by the ASP.NET module.

    So the IIS connection Timeout should be larger than the executionTimeout.

    Best Regards,

    Jean

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, October 27, 2017 2:51 AM

All replies

  • User753101303 posted

    Hi,

    Didn't know about the IIS one. If you meant https://docs.microsoft.com/en-us/iis/configuration/system.applicationhost/sites/sitedefaults/limits#configuration it seems to handle closing the underlying network connection (and maybe rather for incoming data).

    executionTimeout is to limit the execution time of your code. I never had any any problem in changing this one and never had to change the first one.

    If you have a particular problem, it's likely best to discuss directly the problem. If not, though anticipating issues is good, you should also avoid to question everything. Try or just wait to see if you have a problem. Once again I don't remember to have heard about an IIS connection timeout issue.

    Thursday, October 26, 2017 4:33 PM
  • User1771544211 posted

    Hi arneG,

    The executionTimeout set the time you allow the request to execute before being automatically shut down by ASP.NET. The default is 110 seconds. Image that you have a large file to upload, it may take 5mins, so you need to set the executionTimeout to 300 or larger. Otherwise the request will be shutdown by the application.

    The connection Timeout set the time (in seconds) that IIS waits before it disconnects a connection that is considered inactive. The default value is 120sec.

    Image that you have a large file to upload, it may take 5mins and you have set the executionTimeout to 300 or larger. But the connection Timeout is still 120s. So the IIS will terminates the connection and show connection timeout  to the user.

    In general, the executionTimeout and connection Timeout both control the time that you limit the request to be handled. And the IIS connection timeout includes all the time that spend to handle this request including these time used by some IIS modules. The executionTimeout only controls the time that used by the ASP.NET module.

    So the IIS connection Timeout should be larger than the executionTimeout.

    Best Regards,

    Jean

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, October 27, 2017 2:51 AM
  • User753101303 posted

    Humm... Would have to triple check but on my side I don't remember to have ever changed this. For now my understanding of the documentation is that it is basically the amount of time during which IIS will wait without receiving anything at all rather than a total duration (ie you are fine as long as IIS doesn't wait more than 2 minutes for new incoming data during the upload).

    Friday, October 27, 2017 3:16 PM