Even though you might not think a profiler would be useful, it might not
hurt to just poke around and see what's up.

JProbe is a useful tool for debugging/profiling these types of errors, you
can remotely connect and watch things like object creation, heap usage,
etc..See what types of objects have been allocated most,what things may not
be being garbage collected,etc..


-----Original Message-----
From: Kito D. Mann [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 2:16 PM
To: Struts Users Mailing List
Subject: Re: [OT] OutOfMemoryError when I have plenty of heap


Casey,

If you're using JSP, and you have a large number of pages running in a
single VM, you may be filling up the "permanent generation" area of the
VM's memory. This is a fixed amount of memory dedicated to classes,
methods, and so on (reflective data). Since JSPs are compiled into classes,
it's actually possible to fill up this area of memory and consequently get
an OutOfMemoryError. You can, of course, increase the size -- see
http://java.sun.com/docs/hotspot/gc1.4.2/ for details.

How many JSPs does At 08:21 AM 9/17/2003 -0400, you wrote:
>Hi everyone,
>
>There are many smart people on this list and I haven't been
>able to get anywhere with this problem, so...
>
>I'm running 12 Struts-based apps under Resin 2 on a Linux box.
>(I don't believe that this is a Struts problem - this is
>just some background for you)
>
>Every few days (sometimes this will happen after 2 days, sometimes
>5 or 6) I get an OutOfMemory error which stops the JVM...
>I have plenty of room in the heap (the machine has 1 GB or
>RAM and I have the max heap size -Xmx set to 896 MB) Just before
>it dies there are a few attempts to free more memory.
> >From the GC log:
>
>Full GC 227765K->132728K(274140K), 3.2615930 secs
>Full GC 132729K->132728K(274140K), 2.5218730 secs
>Full GC 132803K->120231K(274140K), 3.1998370 secs
>OutOfMemoryError
>
>As you can see - I'm only using 132 MB after the first
>GC which leaves plenty.... Runtime.freeMemory()
>etc. returns similar results..
>
>Does anybody have any ideas? I don't even know where to look
>next... It doesn't look like a profiler would help me here
>since I don't have tons of objects filling up my memory.....
>
>Thanks,
>Casey

Kito D. Mann
Author, JSF in Action
JSF FAQ: http://www.jsfcentral.com





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to