-
1. Re: OutOfMemoryException. How to configure run.conf in Jboss AS?
gjeudy Oct 24, 2008 5:59 PM (in response to roger75)Use BEA JRockit VM instead of Sun VM. I use JRockit and never had OutOfMemory exception after a hot redeploy
Using Sun VM and upping the memory heap and permsize heap pushes back the inevitable. I think there is some GC params that you can use to modify Sun VM behavior but I dont know their worth:
-XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled
If you decide to try out there params, let me know how it goes, it should allow the sun VM GC to sweep the permgen space getting rid of the pernicious OOM Error.
-
2. Re: OutOfMemoryException. How to configure run.conf in Jboss AS?
www.supernovasoftware.com Oct 24, 2008 6:06 PM (in response to roger75)I was using Bea JRockit to correct this problem, but now it is only available to download with other Oracle products so I switched to Sun in both development and production. I will probably switch to IceTea in the future.
Now I just run up my permagen to 1 GB or so. This prevents the error for some time. At that point I just restart JBoss.
This problem has been around for a very long time and I have not heard of a better solution.
-
3. Re: OutOfMemoryException. How to configure run.conf in Jboss AS?
ericjava.eric.chiralsoftware.net Oct 24, 2008 7:32 PM (in response to roger75)The point is, class structures aren't getting unloaded so there is a memory leak in the JVM itself. No matter how high you set the memory, if you redeploy enough times, you will eventually run out of memory because the classes are never unloaded. And it doesn't take that many redeployments. A simple web app might use many megabytes of class files these days, especially if you throw in iText PDF, some Rules, etc. Suddenly that's a lot of memory.
I don't fully understand why classes can't unload but this has been a long-standing problem. It would be nice if there were some fix for it within the standard Sun JRE. I assume if this were something easy to do it would have been done long ago.
-
4. Re: OutOfMemoryException. How to configure run.conf in Jboss AS?
www.supernovasoftware.com Oct 24, 2008 8:10 PM (in response to roger75)Has anyone tried IcedTea or OpenJDK 6 or 7?
I read somewhere that JRockit just lets Permagen go up to 4GB without setting any configuration. Is this true or do they have a better solution?
Now that I switched off JRockit this is starting to become more troublesome.
-
5. Re: OutOfMemoryException. How to configure run.conf in Jboss AS?
luxspes Oct 24, 2008 9:49 PM (in response to roger75)
Jason Long wrote on Oct 24, 2008 18:06:
I was using Bea JRockit to correct this problem, but now it is only available to download with other Oracle products so I switched to Sun in both development and production. I will probably switch to IceTea in the future.
You still can download JRockit from Oracle web site here, it is free (as in beer) but AFAIK you can only use it for development purposes (no production, unless you use it with Oracle WebLogic).
But to avoid memory problems in development is great! -
6. Re: OutOfMemoryException. How to configure run.conf in Jboss AS?
luxspes Oct 24, 2008 9:53 PM (in response to roger75) -
7. Re: OutOfMemoryException. How to configure run.conf in Jboss AS?
www.supernovasoftware.com Oct 24, 2008 10:03 PM (in response to roger75)I prefer to keep my development and production environment the same, but thanks for the link.
-
8. Re: OutOfMemoryException. How to configure run.conf in Jboss AS?
matteg.gerry.matte.shaw.ca Oct 30, 2008 11:02 PM (in response to roger75)I was just installing the new SEAM2.1.0.SP1 and reviewing section 2.1 of the SEAM reference manual. I wanted to verify that the suggested Perm Sizes had not changed since my last SEAM installation.
I see that the suggested MaxPermSize=512 in the manual. Should this be 512m ? There would be a big difference between MaxPermSize of 512 bytes versus 512 Megabytes.
-
9. Re: OutOfMemoryException. How to configure run.conf in Jboss AS?
shane.bryzak Oct 31, 2008 12:22 AM (in response to roger75)Oops you're right. I've fixed this in SVN.