Reputation: 127
We have a web application deployed on IIS 7.5 target framework 4.0 the application perform slow when leave idle for few minutes for first time and then perform as expected this happened each time application is idle. With the help of fiddler I found its TCP/IP connection which is taking time about 21 secs whilein subsequent calls this time is 0. The Idle time out is also set high and connection time out is also high in the IIS settings. server is - Windows 2008 R2. there is nothing in the event viewer related to the website. we used form authentication but the time out for that is also set about 10 hours in the config file.
Can anybody point me to the setting with is affecting the response time after the app is idle for some time. Note - this was working proper when deployed withing the LAN but this problem starts when deployed out of the LAN or in separate domain.
Upvotes: 8
Views: 5568
Reputation: 49
Well, a bit late, but may help someone else. I had the same problem, nothing in the logs, spent days, then looking at the network adapter properties / configuration / power management - Allow computer to shut down save power was checked. Unchecked and the problem was solved.
Upvotes: 0
Reputation: 1459
- Problem
here is the problem in IIS app pool idle time out, its by default set to 20 minutes, after 20 minutes app pool shutdown if no request within 20 minutes, when any request comes after 20 minute its again start, The problem is that the first visit to an app pool needs to create a new w3wp.exe worker process which is slow because the app pool needs to be created, ASP.NET or another framework needs to be loaded, and then your application needs to be loaded. so it may take time 20-30 seconds or depends on the application content size.
- Solution
so to avoid this type of delay we need to set the idle time out to 0. now it will always load fast.
- app pool setting
Upvotes: 8
Reputation: 11326
The IIS application pool is shut down after 30 minutes of inactivity. After that, when you make a request IIS basically has to start the website up again, which leads to the behavior you are describing. You can change the idle time of your website in IIS though to avoid it.
You could also look into the Auto-Start feature of the 4.0 framework.
Upvotes: 3