In my production env i am getting following error when one of my program is being executed. The user didn't feel any issue but in the log file i got follwoing error.
java.lang.OutOfMemoryError: PermGen space
The mvc framework when tries to inialize the field variables i am getting this error. But this has executed many time but still it is not reproduced. Aftr this error system hanged and it forced us to restart jboss. My jboss version is jboss 3.2.5 and jdk is 1.5. How i can trace out such issue?
in my run.sh i am setting verbosegc
-verbosegc -XX:ThreadStackSize=256 -XX:MaxPermSize=128m
But nothing has shown in the log file, my log file is configured through log4j.
Thanks and Regards
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.
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.
Alexander, 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,\
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.