-
1. Re: java.lang.OutOfMemoryError: PermGen space
aberryjr Mar 3, 2010 7:27 AM (in response to rasa)Yes, doing a lot of String, methods/classes operations can cause errors such as this and as you stated this occurs when there are a lot of variables being initialized. Below is a guide from sun on these errors. Also if they are attempting to use a lot of Strings and doing String operations they may try to use the "Stringbuilder" instead of String.
http://java.sun.com/javase/6/webnotes/trouble/TSG-VM/html/memleaks.html#gbyuu
-
2. Re: java.lang.OutOfMemoryError: PermGen space
rasa Mar 3, 2010 7:36 AM (in response to aberryjr)Yes, doing a lot of String, methods/classes operations can cause errors such as this and as you stated this occurs when there are a lot of variables being initialized.
It is not String variable, i said field variable may be you guessed wrongly. In my jsp file i have lot of fields are there, the field type is not string ( HTMLINPUT HTMLBUTTON - MVC Standards). But the same is working some time.
-
3. Re: java.lang.OutOfMemoryError: PermGen space
peterj Mar 3, 2010 12:46 PM (in response to rasa)1 of 1 people found this helpfulA permgen size of128M is a little small for JBoss AS (or an app server, for that matter). Try bumping it to 256M.
Alexander, doing a lot of String manipulations has no bearing on an OOME for permgen.
-
4. Re: java.lang.OutOfMemoryError: PermGen space
peterj Mar 3, 2010 1:22 PM (in response to peterj)1 of 1 people found this helpfulAlexander, please do not ask questions in a private message. You should have asked it here so that everyone can benefit from the discussion.
The article you referenced,\
http://java.sun.com/javase/6/webnotes/trouble/TSG-VM/html/memleaks.html#gbyuu
talks about intered strings. That is literal strings defined or used in your application. If you create a new string that does not match an intered string, the new string is allocated in the heap, not in the permgen.
-
5. Re: java.lang.OutOfMemoryError: PermGen space
rasa Mar 3, 2010 11:24 PM (in response to peterj)A permgen size of128M is a little small for JBoss AS (or an app server, for that matter). Try bumping it to 256M.
Thanks Peter, i will do this. Thanks for the guidance.
-
6. Re: java.lang.OutOfMemoryError: PermGen space
rasa Mar 3, 2010 11:31 PM (in response to aberryjr)Alexander thanks for the support. -
7. Re: java.lang.OutOfMemoryError: PermGen space
ruchirc Aug 5, 2010 1:57 AM (in response to rasa)The permanent generation is used to store class objects and related meta data,
Try,
-XX:PermSize=256m -XX:MaxPermSize=256m If the problem still persist,then its better to do a profiling and see what is the class which are making too many objects and why.
Thanks,
Ruchir