From: mgdev on
I need some help on how to troubleshoot IIS Randomly Hanging on my server.

Late last year we upgraded our ASP.net (2.0) application with a lot of new
features. Now that we've rolled this new version out to many of our
customers we're getting complaints about IIS hanging and needing to be
restarted. Unfortunately, this hanging is random. After the restart of IIS
the application works as expected. We are unable to predictably reproduce
this hanging situation. But at some point, anywhere from an hour to a few
days, the w3wp.exe will hang again and prevent the system from being used. I
have observed this first hand, but as I stated above, after restarting IIS I
can't reproduce the problem.

We have seen this problem in both IIS6 (Server 2003) and IIS7 (Server 2008).

If you have any suggestions on how I can go about troubleshooting or
resolving this issue I'd like to know. Please know that this is an urgent
matter so if there are any options I can try that would minimize this problem
for the short term I'd like to explore that as well.
From: Mark Rae [MVP] on
"mgdev" <mgdev(a)discussions.microsoft.com> wrote in message
news:E750D961-90C9-4FC5-B271-0F7FC0B37891(a)microsoft.com...

> We have seen this problem in both IIS6 (Server 2003) and IIS7 (Server
> 2008).

Which indicates that the problem lies with your app and not IIS per se.

In my experience, the problems that you're facing are almost always due to
memory leaks.

Check that you are disposing objects correctly - do not under any
circumstances leave them around for the garbage collector to handle. This is
especially true for any unmanaged objects and ADO.NET objects. One simple
thing to check is that you are not persisting ADO.NET objects across pages
or <shudders> in Session.


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

From: Mr. Arnold on
mgdev wrote:
> I need some help on how to troubleshoot IIS Randomly Hanging on my server.
>
> Late last year we upgraded our ASP.net (2.0) application with a lot of new
> features. Now that we've rolled this new version out to many of our
> customers we're getting complaints about IIS hanging and needing to be
> restarted. Unfortunately, this hanging is random. After the restart of IIS
> the application works as expected. We are unable to predictably reproduce
> this hanging situation. But at some point, anywhere from an hour to a few
> days, the w3wp.exe will hang again and prevent the system from being used. I
> have observed this first hand, but as I stated above, after restarting IIS I
> can't reproduce the problem.
>
> We have seen this problem in both IIS6 (Server 2003) and IIS7 (Server 2008).
>
> If you have any suggestions on how I can go about troubleshooting or
> resolving this issue I'd like to know. Please know that this is an urgent
> matter so if there are any options I can try that would minimize this problem
> for the short term I'd like to explore that as well.

You have memory issues, particularly if everything is inproc, and you
have poorly written programs. Memory is being choked, and it's IISreset.
I have seen sites do IISresets as the norm 5 times a day, to prevent the
hangs.
From: mgdev on
In general, we do practice disposing of objects. But I'm sure we are not
perfect and there could be some left behind. Assuming this is a lack of
disposing of objects. Are there any tools that could help me find these
objects? The reason I'm asking is, this application is very large (100+
classes plus 100+ aspx pages) and will take a lot of time to go through line
by line to find indisposed objects.

Please let me know your thoughts.

"Mark Rae [MVP]" wrote:

> "mgdev" <mgdev(a)discussions.microsoft.com> wrote in message
> news:E750D961-90C9-4FC5-B271-0F7FC0B37891(a)microsoft.com...
>
> > We have seen this problem in both IIS6 (Server 2003) and IIS7 (Server
> > 2008).
>
> Which indicates that the problem lies with your app and not IIS per se.
>
> In my experience, the problems that you're facing are almost always due to
> memory leaks.
>
> Check that you are disposing objects correctly - do not under any
> circumstances leave them around for the garbage collector to handle. This is
> especially true for any unmanaged objects and ADO.NET objects. One simple
> thing to check is that you are not persisting ADO.NET objects across pages
> or <shudders> in Session.
>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net
>
From: Patrice on
Have you tried to check the event viewer for messages ? It should be always
the first step when something goes wrong...

See http://msdn.microsoft.com/en-us/library/ms524984.aspx and the "Opening
the event viewer" section if needed...

--
Patrice

"mgdev" <mgdev(a)discussions.microsoft.com> a écrit dans le message de
news:E750D961-90C9-4FC5-B271-0F7FC0B37891(a)microsoft.com...
>I need some help on how to troubleshoot IIS Randomly Hanging on my server.
>
> Late last year we upgraded our ASP.net (2.0) application with a lot of new
> features. Now that we've rolled this new version out to many of our
> customers we're getting complaints about IIS hanging and needing to be
> restarted. Unfortunately, this hanging is random. After the restart of
> IIS
> the application works as expected. We are unable to predictably reproduce
> this hanging situation. But at some point, anywhere from an hour to a few
> days, the w3wp.exe will hang again and prevent the system from being used.
> I
> have observed this first hand, but as I stated above, after restarting IIS
> I
> can't reproduce the problem.
>
> We have seen this problem in both IIS6 (Server 2003) and IIS7 (Server
> 2008).
>
> If you have any suggestions on how I can go about troubleshooting or
> resolving this issue I'd like to know. Please know that this is an urgent
> matter so if there are any options I can try that would minimize this
> problem
> for the short term I'd like to explore that as well.