Search code examples
asp.nettimeoutiis-8

ASP.net site on IIS 8 stops responding after 20 minutes


This should be an easy one, but I've been poking at it all day and can't get it resolved.

I have a simple ASP.net site that has some text boxes, dropdowns, and a couple buttons. One of the text boxes has an OnTextChanged event and the dropdowns have OnSelectedIndex events. Naturally, the buttons have OnClickEvents attached to them.

All the events are simple and take seconds to run. Everything is working perfectly.

The issue I'm having is when someone loads the page, does some work and then walks away for 20 plus minutes. When they return to the page, nothing works. They can enter data in the text boxes and select values from the dropdowns, but none of the events fire. This forces the users to refresh the page to get everything working again.

I've messed with multiple time-out settings in the code and web-config. I've adjust time-out settings on the site and IIS server. Nothing seems to work. The page just dies after 20 minutes.

Now, as I say that, I have tested 5 minutes and 10 minutes. Both of those work just fine. So, the lack of response kicks in sometime after 10 minutes but I've been using 20 minutes for my testing.

Like I said, I'm sure it is something simple and I'll feel like an idiot when I finally find it, but I've wasted way too much time on this so far. It's possible that I've modified the correct setting but forgot to refresh the page or clear the cache or something silly, but so far I'm just stuck.


Solution

  • As Alex Kudryashev says I suggest you could check the Idle Timeout setting in the application pool.

    The Idle Timeout minutes is the amount of time a worker process will remain idle before its shut down. A worker process is idle if it is not processing request and no new request are received. The default value is 20(min).

    That means if the server doesn't receive all the request the process will shut down. So you will fell your application doesn't work for 20 minutes.

    To avoid this you could modify the value to 0. That means the setting has been disabled. Your application will always running.

    Details, you could refer to below image:

    enter image description here