Garbage Collection not running?

K

klar02

We have a web server with 2GB of physical memory on it and we are seeing the
memory usage running over 800,000KB in Task Manager. We have seen instances
where the memory being this high(due to problems with ColdFusion) has caused
the server to hang but this server is not hanging. Can anyone give me a
little insight on when garbage collection should run and if it should be
running before we get to 800,000KB(800MBG)? We are wondering if the server
is just idle enough and the memory is not needed so garbage collection is
not running. We are receiving only about 70 applicants of the application
per day so I don't think the server is overwhelmed with traffic either.

If anyone has any thoughts on this I would certainly appriciate it.

Thanks!
Andy
 
K

Kevin Spencer

GC will run less often if there is enough RAM, but it sounds like your app
is using an awful lot. How much traffic is it getting?

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Complex things are made up of
lots of simple things.
 
L

Laurent Bugnion

Hi,
We have a web server with 2GB of physical memory on it and we are seeing the
memory usage running over 800,000KB in Task Manager. We have seen instances
where the memory being this high(due to problems with ColdFusion) has caused
the server to hang but this server is not hanging. Can anyone give me a
little insight on when garbage collection should run and if it should be
running before we get to 800,000KB(800MBG)? We are wondering if the server
is just idle enough and the memory is not needed so garbage collection is
not running. We are receiving only about 70 applicants of the application
per day so I don't think the server is overwhelmed with traffic either.

If anyone has any thoughts on this I would certainly appriciate it.

Thanks!
Andy

This amount of memory lets me think that you have a memory leak
somewhere. We also had some in the beginning in our project, and had the
server hit 1GB RAM sometimes under stress conditions. The problem with
memory leak is that the GC cannot collect the garbage, as it is
circularly referenced. I recommend to check your code carefully for
circular references, etc... and to make sure that you release your
objects when they are not used anymore (sometimes simply setting them to
null helps). There are also tools available for this kind of search, but
I am not a specialist of them.

HTH,
Laurent
 
E

Edwin Knoppert

also check the event log.
Note that objects having a .Dispose() really should be called before
releasing them.
Like the connection object:
oConn.Dispose();
oConn= null;
While setting to null is also done by the GC afaik.
 
K

klar02

Thanks everyone. We have been looking in to memory leaks but the fixes we
have made may not be helping hat much. I have also mentioned to the team
that any object that has a Dispose() method should have that method called
after it is used. I am not sure that we have fully exhausted our resources
on checking this. I don't suppose there is a real easy way to get a list of
objects that have a Dispose() method?

By the way, our traffic is probably low to medium.

Thanks Again everyone. We will look into your recommendations.

Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,063
Latest member
StormyShuf

Latest Threads

Top