Forum Moderators: open

Message Too Old, No Replies

IIS6:Heavy memory usage of worker process

help, server freezes due to this problem

         

Namaste

6:06 pm on Jan 12, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,
I have a small group of sites on Windows 2003 server. We have seperated each site amd put it into it's own application pool.

On Sunday morning, the worker process of one of the app pools, started taking around 35% of CPU. After recycling, it freed the resources that it acquired, but within 30 mins. acquired the resources back. We thus had to reboot the server.

This problem has come in the past too.

We optimized certain parts of the site code, such as closing objects on each page. But this has not solved the problem.

Can someone with experience advise us what to do.

IanTurner

6:43 pm on Jan 12, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Are you sure you haven't got any potentially infinite loops. I have seen this on a number of occasions.

Namaste

7:13 pm on Jan 12, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



how to check if there are any?

redzone

7:32 pm on Jan 12, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Task Manager -> Processes
Look for processes that are hung, or eating CPU..
Be careful though, if you don't know what you are doing....

IanTurner

7:33 pm on Jan 12, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Now thats not easy.

Can you identify a particular file which sets off the heavy memory usage?

If not you're going to have to check every server side processing file on the site.

Namaste

8:26 pm on Jan 12, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I know how to identify process' :)
it is W3WP which is causing the server to hang.
It sometimes starts eating up a huge amount of resources. The question is, what is cauing the W3WP to bloat. I thought it was hung objects, so the code of the whole site was combed and all objects were closed on the page itself.
Yet the problem remains...

can you tell me, what are the potential problems/inefficiencies that cause the W3WP to bloat?

Keep in mind that this problem is coming on a Double Xeon, 6GB with as little as 20 users on the site.

bignet

1:40 am on Jan 13, 2004 (gmt 0)

10+ Year Member



can you afford to stop some apps to figure out the offending one?

Namaste

1:28 pm on Jan 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



it is not an app. that is the root of the problem. It is something to do with the code on our pages that is causing the worker process (which is an app.) to bloat.
If you know of the possible code inefficiencies, that cause the worker proces (W3WP) to bloat, then please post here.

IanTurner

2:02 pm on Jan 13, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



As I said the only thing I have seen that has caused that to happen is an infinite loop in the code.

Namaste

2:14 pm on Jan 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ian, how does one trace an infinite loop?

redzone

2:17 pm on Jan 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ian,

An infinite loop will usually peg your CPU though at 100%....

Namaste

2:22 pm on Jan 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



yes, but how do we trace which pages code is causing it?

korkus2000

2:24 pm on Jan 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How heavily are you using sessions with that code?

IanTurner

3:16 pm on Jan 13, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



IIS allows you to throttle CPU time if you've set a max limit for each site you can end up with high memory usage and less than 100% CPU.

The most common cause of infinite loops that I have seen is failing to increment a recordset and checking to see whether the recordset has reached the EOF marker.