Manage IIS Server Memory Usage

In this article we’ll discuss how to Manage IIS Server Memory Usage. IIS issue a worker process for every Application Pool configured in it. From the screenshot of Task Manager, it’s really hard to find which worker process belongs to which IIS Application Pool and which web application is consuming more memory and need attention. You can Identify worker process using its PID and can do the needful.

If any worked process or PID is consuming more memory, then we need to manage its use else other application hosted on same server will be killed or become down.

Manage IIS Server Memory Usage

Manage IIS Server Memory Usage

There are multiple ways to handle the memory usages in IIS, let’s discuss those possible ways.

  • Open IIS.
  • Under sever name select ‘Application Pool’ option. You’ll see the list of available app pools.
Manage IIS Server Memory Usage

  • Select the required app pool and select ‘Recycling’ option as shown in above image.
  • On click of ‘Recycling’ Following screen will appear.

Manage IIS Server Memory Usage

Here we have multiple way to do ‘Recycling’ and Manage IIS Server Memory Usage.

Let’s discuss:

  • Fixed Intervals: We can define number of requests after which recycle will take place and new worker process will be assigned. You can see new PID which indicate new worker process assigned after recycling.   
  • Fixed Number of Requests: Recycle can also be done after FIXED number of requests. You can set the limit and after that app pool recycle will take place.
  • Specific Time: Recycle can be done at specific time.
  • Memory based Maximums: It can also be done by defining the maximum limit of memory, when worker process will use more memory then defined at that time recycle will take place.

You can use any of the above defined settings. You can apply above settings on required worker processes and once it will hit this limit, a new worker process for the same pool will be created that it will take care of processing all incoming requests. You can observe new PID in task manager which indicate that new worker process has been initialized after recycle. Once this initiation is finished, previous worker process will stop and new will come in action.

For trouble shooting if you want to know when specifically recycle has done, you can check our article How to enable Application Pool recycle logging. After enabling logging, you can view all recycling events in Event Viewer.

I hope with the end of this article you got the understanding on how to Manage IIS Server Memory Usage and where we can see recycling logs.

You can check more on IIS in our IIS Section. You can also check more concepts of IIS on Microsoft Learn too.

Posted in IIS

One Reply to “Manage IIS Server Memory Usage”

  1. I found this website while searching on one topic. I wanted to know if you can write for us on various topics, generally a tutorial format?

    and If yes, how much will you charge and how it will be calculated?

    If you are not interested in writing for us, ignore this email.

Leave a Reply

Your email address will not be published. Required fields are marked *