Skip navigation

Q: I have an ASP.Net site. I've noticed that the first time I access the site, it's slow, but then it's faster. If I don't use it for a while, the first access is slow again. How can I stop this first access slowness?

A: IIS uses something called Just In Time (JIT) compilation, which compiles ASP.NET pages as they're accessed the first time. Then this compilation is cached in the AppPool, so subsequent accesses are fast. If a site isn't accessed for a long time, this cached compilation is recycled, freeing up resources. But this means that the next access requires compilation again. You can change the settings so the recycling doesn't occur:

  1. Start the Internet Information Services (IIS) Manager.
  2. Select , Application Pools.
  3. Right-click the application pool for the site you want to change. Select Advanced Settings.
  4. Change both the Idle Time-out (minutes) entry under Process Model and the Regular Time Interval (minutes) under Recycling to 0 and click OK.
    062011-iis-app-pool-perf-small_0

  5. You can now right-click the pool and select Recycle to force a recycle using the new values.
  6. Access the site in a browser to force the initial compilation, which will no longer be recycled, thanks to your new settings.
Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish