Please refrain from top-posting. I find it most confusing.
> > ...
> > > I want to get Garbage collector ouput in Tomcat 5.x.
> >
> > Why? Do you suspect an application has a
> > memory leak?
...
> Yes...I keep getting OutOfMemoryException...
Hi Andrew,
Yes. I do know that calling GC will not help. But I'm facing a weird
problem..The same app is being run on two systems and the same requests
are made on both the systems....the amt of data handled is also the
same in both...for e.g., if I'm sending the same 100 requests to both
the servers, all 100 go through in one but the other crashes in between
complaining of outOfMemoryException...both the systems have the same
memory settings...so I was wondering if there is some problem with the
GC on the crashing system...
thanks for your help..
Andrew Thompson - 14 Dec 2006 11:30 GMT
....
> Yes. I do know that calling GC will not help. But I'm facing a weird
> problem..The same app is being run on two systems and the same requests
[quoted text clipped - 4 lines]
> memory settings...so I was wondering if there is some problem with the
> GC on the crashing system...
That seems like a much better description from
which to start, but it now tells me I am beyond
my area of expertise.
It might also be relevant/helpful to add the Java
versions and Tomcat versions on both systems,
and a little more detail of the 'requests' and their
responses.
E.G. what is the format of the data being passed around?
(Strings/form data, images, 3D models..?)
What is the processing that is done (D/B requests,
image translation and resizing, delivering a model as
data to an application?).
Andrew T.
Daniel Dyer - 14 Dec 2006 11:40 GMT
> Hi Andrew,
> Yes. I do know that calling GC will not help. But I'm facing a weird
[quoted text clipped - 7 lines]
>
> thanks for your help..
Get a profiler and find out what kind of objects are occupying all that
memory and where they are created.
Eclipse and NetBeans have free profilers, or you could get a trial version
of a commercial product (such as JProfiler, JProbe or YourKit).
Dan.

Signature
Daniel Dyer
http://www.uncommons.org
Gugle - 14 Dec 2006 13:36 GMT
Hello all,
I've used the Eclipse profiler and confirmed that there is no memory
leak...because it is running perfectly fine in one system....the app
gets HTTP requests for data over a period of time....the data is in
files which have a proprietary format(no database used)...and the data
is returned as graphs/tables etc...
Version of Java is 1.4.2.11 and tomcat version is 5.0.028
Daniel Dyer - 14 Dec 2006 14:08 GMT
> Hello all,
> I've used the Eclipse profiler and confirmed that there is no memory
> leak...because it is running perfectly fine in one system....
Did you profile it while it was running on the system that it has been
failing on? Profiling it on the other system wouldn't be helpful because
you need to reproduce the problem while the profiler is attached. Finding
out what is filling up the heap should help identify the cause of the
problem. There is presumably some subtle difference between the two
systems that is triggering this behaviour. It could be a bug in your
application, or a bug in Tomcat.
Dan.

Signature
Daniel Dyer
http://www.uncommons.org