Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1042813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:34:04+00:00 2026-05-16T15:34:04+00:00

I am currently experiencing some instability in my session variables and believe the app

  • 0

I am currently experiencing some instability in my session variables and believe the app pool is where the error is coming from. What I cannot find is a list of possible culprits for the issue. What can cause the app pool to recycle on its own, other than a scheduled recycle?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T15:34:05+00:00Added an answer on May 16, 2026 at 3:34 pm

    Common reasons why your application pool may unexpectedly recycle

    EDIT: Full Text in the event that the link goes 404:

    If your application crashes, hangs and deadlocks it will cause/require the application pool to recycle in order to be resolved, but sometimes your application pool inexplicably recycles for no obvious reason. This is usually a configuration issue or due to the fact that you’re performing file system operations in the application directory.

    For the sake of elimination I thought I’d list the most common reasons.

    Application pool settings
    If you check the properties for the application pool you’ll see a number of settings for recycling the application pool. In IIS6 they are:

    Recycle worker processes (in minutes)
    Recycle worker process (in requests)
    Recycle worker processes at the following times
    Maximum virtual memory
    Maximum used memory
    These settings should be pretty self explanatory, but if you want to read more, please take a look at this MSDN article

    The processModel element of machine.config
    If you’re running IIS5 or the IIS5 isolation mode you’ll have to look at the processModel element. The Properties you should pay the closest attention to are:

    memoryLimit
    requestLimit
    timeout
    memoryLimit

    The default value of memoryLimit is 60. This value is only of interest if you have fairly little memory on a 32 bit machine. 60 stands for 60% of total system memory. So if you have 1 GB of memory the worker process will automatically restart once it reaches a memory usage of 600 MB. If you have 8 GB, on the other hand, the process would theoretically restart when it reaches 4,8 GB, but since it is a 32 bit process it will never grow that big. See my post on 32 bit processes for more information why.

    requestLimit
    This setting is “infinite” by default, but if it is set to 5000 for example, then ASP.NET will launch a new worker process once it’s served 5000 requests.

    timeout

    The default timeout is “infinite”, but here you can set the lifetime of the worker process. Once the timeout is reached ASP.NET will launch a new worker process, so setting this to “00:05:00” would recycle the application every five minutes.

    Other properties

    There are other properties within the processModel element that will cause your application pool to recycle, like responseDeadlockInterval. But these other settings usually depend on something going wrong or being out of the ordinary to trigger. If you have a deadlock then that’s your main concern. Changing the responseDeadlockInterval setting wouldn’t do much to resolve the situation. You’d need to deal with the deadlock itself.

    Editing and updating

    ASP.NET 2.0 depends on File Change Notifications (FCN) to see if the application has been updated. Depending on the change the application pool will recycle. If you or your application is adding and removing directories to the application folder, then you will be restarting your application pool every time, so be careful with those temporary files.

    Altering the following files will also trigger an immediate restart of the application pool:

    web.config
    machine.config
    global.asax
    Anything in the bin directory or it’s sub-directories
    Updating the .aspx files, etc. causing a recompile will eventually trigger a restart of the application pool as well. There is a property of the compilation element under system.web that is called numRecompilesBeforeAppRestart. The default value is 20. This means that after 20 recompiles the application pool will recycle.

    A workaround to the sub-directory issue
    If your application really depends on adding and removing sub-directories you can use linkd to create a directory junction. Here’s how:

    Create a directory you’d like to exclude from the FCN, E.g. c:\inetpub\wwwroot\WebApp\MyDir
    Create a separate folder somewhere outside the wwwroot. E.g. c:\MyExcludedDir
    use linkd to link the two: linkd c:\inetpub\wwwroot\WebApp\MyDir c:\MyExcludedDir
    Any changes made in the c:\inetpub\wwwroot\WebApp\MyDir will actually occur in c:\MyExcludedDir so they will go unnoticed by the FCN.

    Is recycling the application pool really that bad?
    You really shouldn’t have to recycle the application pool, but if you’re dealing with a memory leak in your application and need to buy time to fix it, then by all means recycling the application pool could be a good idea.

    What about session state?

    Well, if you’re running in-process session state, then obviously it’s going to be reset each and every time the application pool is recycled. If you need to brush up on your state server options, then I recommend taking a look at this entry.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently working with jQuery 1.4.2 and jQuery UI 1.8.2. I'm experiencing some weird
I am currently looking into socket programming in python and I am experiencing some
I'm currently experiencing some scrolling issues in a few of my views. The performance
I'm currently experiencing some problems with the Graph API when inviting users to an
I'm currently experiencing a weird issue when it comes to parsing some JSON when
I really need some help with Plone. I am experiencing some issue upgrading from
i'm currently experiencing a little problem. I'm using nhibernate with around 40 entities mapped
Our website is currently experiencing high volume download traffic. It will soon exceed the
I'm currently experiencing with the new c++0x variadic templates, and it's quite fun, Although
I'm experiencing some issues with rewriting my blocking socket server to a non-blocking version.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.