Memory based recycling not working all the time

Giganews Newsgroups
Subject: Memory based recycling not working all the time
Posted by:  richard.markiewi…@eshareuk.com (richard.markiewi…@eshareuk.com)
Date: Wed, 13 Aug 2008

Hi

I wonder if anyone can help with this. I asked MS on the Partner
newsgroups and they suggested I take it up with PSS; but before doing
that I thought I’d ask here and see if anyone might throw some
additional light on my problem.

Win2k3 SP1, IIS 6, SharePoint (MOSS SP1). Server is a lone web/
application server. I have 20 SharePoint web applications and each one
is extended across 2 IIS web sites – so that’s 40 IIS web sites and
they all share a single application pool. The application pool is set
to recycle daily at 4am.

We started getting out of memory exceptions on the pool on very high
traffic days in the late afternoon. Of course the pause between the
process crashing and IIS restarting the pool caused an ugly downtime
of a few minutes each time this happened. So I enabled automatic
recycling when reaching 800mb of physical memory. This worked great –
now, on those high traffic days, instead of sometimes seeing a crash
in the late afternoon I’d see an information event that the pool
reached its memory limit and recycled.

MOSS runs a full index every day at 6am. The index runs for a couple
of hours and hits all the sites. Last week I saw another out of memory
exception, this time at 7am. It happened again the next day, at 7am.
Since I know the pool is getting recycled when it hits its physical
memory limit; I figure we must be running out of virtual memory. So I
configure it to also recycle after 1500mb of VM. Great – problem goes
away. The pool now recycles a few times a day after reaching its VM
limit but that’s no big deal; the users get a little performance hit
for a couple of seconds every 4 hours or so.

Today – the index starts at 6am. Application pool crashes (out of
memory exception) at 6.42am and then again at 7.44am.

What I don’t understand is how this is possible, given that IIS is
supposed to recycle the pool before it gets to this point. Of course I
understand that recycling is not a replacement for fixing a faulty
application, or adding more memory; or whatever needs to be done to
solve the root cause of the issue. Indeed the server has spare
capacity and my next step is break the sites between two application
pools (the server is 32 bit and I understand the 2Gb process
limitation).

But before I do that I’d really like to understand the behavior. I’m
running out of memory because I have a lot of sites, and the index
operation is hammering them but say I have some custom code running in
the sites that is leaking memory… Until I could fix that, I’d want to
implement a memory-based recycle in IIS to stop the pool from crashing
when it runs out of memory. But why is IIS letting this pool run out
memory with recycling configured for both physical and VM?

Am I missing part of the picture here? Or is my view of all this just
too simplistic?

Many thanks in advance for any ideas,

Richard

Replies