cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pier Fumagalli <>
Subject Re: [HELP] determining possible leak
Date Thu, 20 Mar 2003 19:36:36 GMT
"Marco Rolappe" <> wrote:

> symptoms:
> - webapp runs fine for hours (12-24 hours) with a max. cpu usage of about
> 4%
> - memory usage is continuously rising
> - at some point cpu usage continuously around 100%, distributed to the
> processors

Nothing in the logs? No output to standard output/error? Do you see an

> can anyone explain
> - the discrepancy between the memory usage reported by the store-janitor
> and ps/top?

Well, what you set by -Xmx is how much memory the JVM will allocate for JAVA
objects... Top reports how much memory the JVM actually occupies (the JVM
itself PLUS the Java Heap)...

> - where the leak may be? (from the janitor's values I assume it's not
> within the JVM but within the java process?)

Are you sure it's a memory leak? How can you be sure of that? The JVM will
grow slowly to basically occupy all its heap, but will never release back
its "unused" memory to the underlying OS...

> finally, a snip from the janitor's log. please note that top reports a
> memory usage of about 223MB. -Xmx is -Xmx196. cpu usage is currently normal.
> but this maybe because the JVM's heap size hasn't reached its maximum yet
> (according to the janitor).

Yes, there's nothing wrong with this log... If you set the VM to run with
-Xms196 -Xmx196, you'll have a VM which after initialization should not
claim any more memory from the OS... You should first use this to see if you
actually have a memory leak or not. And then only use the output from the
store janitor.


View raw message