Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between IIS reset and application pool recyle in affecting of cache

Tags:

I have encountered a weird problem: as far as I know, cache can be cleared by recycling the application pool.

However, in a recent project, cache is not cleared in that way. Instead we had to reset IIS to clear the cache.

What are the differences between these actions, and what might be the cause of the differences I've experienced?

like image 287
D.J Avatar asked Nov 23 '11 03:11

D.J


People also ask

What happens when application pool is recycled?

What is application pool recycling in IIS? Recycling means that the worker process that handles requests for that application pool is terminated and a new one is started. This is generally done to avoid unstable states that can lead to application crashes, hangs, or memory leaks.

Does Iisreset clear cache?

When you do an IISReset the IIS cache will be cleared and then will start to be rebuilt after it starts back up as client requests come in. If you update a file then the older cached file will become stale and IIS will serve the updated file and update the cache with the new file.

Does Iisreset restart application pools?

Does IISRESET recycle the application pools? The correct answer is no. Instead, IISRESET causes the shutdown of all active IIS worker processes, kills them if they do not stop in time.

What is an Iisreset?

IISRESET is a dinosaur from the before-times, specifically before IIS 6.0 shipped in Windows Server 2003. With IIS 5.0 and earlier versions of IIS, the web server was a monolith. An IIS reset tool was needed for restarting the web server process to resolve performance issues that may have developed in the application.


1 Answers

When you recycle the AppPool, there is some overlap time. Your unhealthy worker process is marked for recycling, but continues to handle requests that it has already received. (It will not handle new requests). The unhealthy worker will be terminated once all its existing requests are handled.

With IIS reset, all workers are terminated and the cache in memory is cleared. New workers will be created once new requests come in.

So I think that for both an AppPool recycle and an IIS reset will clear the cache. As for as I know, that cache is stored in the Application domain. Once the unhealthy worker process terminates, all cache items should be destroyed.

like image 101
Pongsathon.keng Avatar answered Sep 19 '22 18:09

Pongsathon.keng