Re: [OT] OutOfMemoryError when I have plenty of heap
I have a few questions reg the below Is this recreatable is there a certain place where you get this OutOfMemory exception Are you using JNI Also Can you please send the stack trace. Regards Sreekant G @ 98404-65630 Casey Forbes <[EMAIL PROTECTED]To: [EMAIL PROTECTED] s.com> cc: Subject: [OT] OutOfMemoryError when I have plenty of heap 09/17/2003 05:51 PM Please respond to "Struts Users Mailing List" 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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This mail was scanned by Interscan Virus Wall of Mailserver2 at SNR, TCS, Chennai - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] OutOfMemoryError when I have plenty of heap
You could be running out of file descriptors? run ulimit before you start resin. - Original Message - From: "Casey Forbes" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 17, 2003 5:21 AM Subject: [OT] OutOfMemoryError when I have plenty of heap > 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 > > > > - > 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]
RE: [OT] OutOfMemoryError when I have plenty of heap
Casey, I asked the same question on August 20th an received the below answer from David Graham. I believe the bug was with reloading (stop/start) of Tomcat apps not fully releasing properties. I was developing and seeing this problem after about 20 or so stop/start actions. I still haven't deployed to production so I can't answer how it works in production. Perhaps you can make a cron/scheduled job to stop/restart tomcat at some off-peak time (midnight for 30 seconds?) Regards, David *** -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 1:20 PM To: Struts Users Mailing List Subject: Re: Out of Memory Error on Struts 1.1, Tomcat 4.1.27, Linux JDK 1.4.2? There's a bug report on this issue: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14042 This only happens when reloading the app and will be fine in production. David *** -Original Message- From: Casey Forbes [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 17, 2003 8:21 AM To: [EMAIL PROTECTED] Subject: [OT] OutOfMemoryError when I have plenty of heap 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 - 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]
Re: [OT] OutOfMemoryError when I have plenty of heap
Hello, I haven't been able to recreate this OutOfMemoryError. It doesn't seem to occur in any particular place. It happens a few times a month and I've written some little things to summarize and help me analyze the HTTP access logs and the Struts RequestProcessor logs but I can't find any patterns... I'm not using any JNI. I don't have a stack trace. One was not generated. Thanks, Casey On Wed, 17 Sep 2003, [EMAIL PROTECTED] said: > > I have a few questions reg the below > > Is this recreatable > is there a certain place where you get this OutOfMemory exception > Are you using JNI > > Also Can you please send the stack trace. > > Regards > Sreekant G > @ 98404-65630 > > > > Casey Forbes > <[EMAIL PROTECTED]To: [EMAIL PROTECTED] > s.com> cc: >Subject: [OT] OutOfMemoryError when > I have plenty of heap > 09/17/2003 05:51 > PM > Please respond to > "Struts Users > Mailing List" > > > > > > > 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 > > > > - > 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]
Re: [OT] OutOfMemoryError when I have plenty of heap
Set JAVA_OPTS=-server -verbose:gc -Xms64m -Xmx64m and test your application manually or using some kind automated loop. At some point, excessive garbage collection will take place. Look for "Full GC". If you don't see it, you may not be exercising the problem part on the application. "Full GC" will start appearing more and more on the screen. Eventually, you'll get your OutOfMemoryError. Next, run Tomcat with JAVA_OPTS=-server -Xms64m -Xmx64m -Xrunhprof:heap=sites. Look at the java.hprof.txt file for the SITES section. This will show you the TRACE# (location of the code) of some of the big object creating methods. Find the trace number (second to last column in the SITES section). Go back to the top of the file and search for TRACE #, where '#' is the trace number you just pulled. Hopefully, the stack trace at tha point is meaningful. If it's not, you can increase the trace depth with -Xrunhprof:heap=sites,depth=5. This should help you hone in on problem areas. -Carl Casey Forbes wrote: > Hello, > > I haven't been able to recreate this OutOfMemoryError. It doesn't > seem to occur in any particular place. It happens a few times > a month and I've written some little things to summarize and help > me analyze the HTTP access logs and the Struts RequestProcessor logs > but I can't find any patterns... > > I'm not using any JNI. > > I don't have a stack trace. One was not generated. > > Thanks, > Casey > > On Wed, 17 Sep 2003, [EMAIL PROTECTED] said: > > > > > I have a few questions reg the below > > > > Is this recreatable > > is there a certain place where you get this OutOfMemory exception > > Are you using JNI > > > > Also Can you please send the stack trace. > > > > Regards > > Sreekant G > > @ 98404-65630 > > > > > > > > Casey Forbes > > <[EMAIL PROTECTED]To: [EMAIL PROTECTED] > > s.com> cc: > >Subject: [OT] OutOfMemoryError > > when I have plenty of heap > > 09/17/2003 05:51 > > PM > > Please respond to > > "Struts Users > > Mailing List" > > > > > > > > > > > > > > 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 > > > > > > > > - > > 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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]
RE: [OT] OutOfMemoryError when I have plenty of heap
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]
Re: [OT] OutOfMemoryError when I have plenty of heap
Hi Kito, Thank you. This is worth looking at (plus the link looks interesting). I've got a lot of classes that from JSP compilation. I also have lots and lots of sun.reflect.GeneratedMethodAccessor classes (from Digester and PropertyUtils I guess) and lots of _xsl._ caucho_0anonymous__xsl classes from Resin's XSLT engine. I'm also looking at Daniel's suggestion about hitting the open files limit (which I can easily increase if it turns out to be the cause) Casey On Wed, 17 Sep 2003, Kito D. Mann said: > 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]
Re: [OT] OutOfMemoryError when I have plenty of heap
Casey, No problem. Good luck, and let us know when you figure out what the problem is. I know how annoying these problems can be -- I was once at a company where this problem sneaked passed QA, and those were some stressful days :-). Kito D. Mann Author, JSF in Action JSF FAQ: http://www.jsfcentral.com At 03:50 PM 9/17/2003 -0400, Casey Forbes wrote: Hi Kito, Thank you. This is worth looking at (plus the link looks interesting). I've got a lot of classes that from JSP compilation. I also have lots and lots of sun.reflect.GeneratedMethodAccessor classes (from Digester and PropertyUtils I guess) and lots of _xsl._ caucho_0anonymous__xsl classes from Resin's XSLT engine. I'm also looking at Daniel's suggestion about hitting the open files limit (which I can easily increase if it turns out to be the cause) Casey On Wed, 17 Sep 2003, Kito D. Mann said: > 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]
RE: [OT] OutOfMemoryError when I have plenty of heap
Hello Casey, We were hitting the same problem with linux and tomcat while doing our performance tests. We were hitting OutOfMemory errors even though process memory usage was under the limits set by Xmx and there was free memory on the machine. It seems the linux(2.4.7)/jdk(1.4.0) combo that we had, had a hard limit of 1024 threads and this was causing the errors. We upgraded to linux 2.4.20/jdk 1.4.2 and that seems to have solved the problem. Cheers, Krishna -Original Message- From: Casey Forbes [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 1:21 AM To: Kito D. Mann Cc: Struts Users Mailing List Subject: Re: [OT] OutOfMemoryError when I have plenty of heap Hi Kito, Thank you. This is worth looking at (plus the link looks interesting). I've got a lot of classes that from JSP compilation. I also have lots and lots of sun.reflect.GeneratedMethodAccessor classes (from Digester and PropertyUtils I guess) and lots of _xsl._ caucho_0anonymous__xsl classes from Resin's XSLT engine. I'm also looking at Daniel's suggestion about hitting the open files limit (which I can easily increase if it turns out to be the cause) Casey On Wed, 17 Sep 2003, Kito D. Mann said: > 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]
Re: [OT] OutOfMemoryError when I have plenty of heap
My OutOfMemoryError problem is fixed. Thanks for all of your suggestions. Kito's permanent generation suggestion was the answer. (Thanks Kito!) I was able to monitor the perm space utilization with the following JVM flags: -J-XX:+PrintGCTimeStamps -J-XX:+PrintGCDetails -J-Xloggc:[path to gc log] When I found that the default max perm size of 64 MB was too low I increased it to 128 MB with: -J-XX:MaxPermSize=128m This took care of my OutOfMemory errors. I also found a very cool tool called "jvmstat" which can monitor your VMs and record performance data (such as the heap utilization) without slowing down your apps. This only works with the 1.4.1 JVM... http://developers.sun.com/dev/coolstuff/jvmstat Casey On Thu, 18 Sep 2003, Kito D. Mann said: > Casey, > > No problem. Good luck, and let us know when you figure out what the problem > is. I know how annoying these problems can be -- I was once at a company > where this problem sneaked passed QA, and those were some stressful days :-). > > Kito D. Mann > Author, JSF in Action > JSF FAQ: http://www.jsfcentral.com > > At 03:50 PM 9/17/2003 -0400, Casey Forbes wrote: > >Hi Kito, > > > >Thank you. This is worth looking at (plus the link looks > >interesting). I've got a lot of classes that from JSP compilation. > >I also have lots and lots of sun.reflect.GeneratedMethodAccessor > >classes (from Digester and PropertyUtils I guess) and lots of > >_xsl._ caucho_0anonymous__xsl classes from Resin's XSLT > >engine. > > > >I'm also looking at Daniel's suggestion about hitting > >the open files limit (which I can easily increase if it > >turns out to be the cause) > > > >Casey > > > > > > > > > >On Wed, 17 Sep 2003, Kito D. Mann said: > > > > > 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]