Reputation: 141
i am working with liferay portal ,when deploying portlet on running server that returns
java.lang.OutOfMemoryError: PermGen space
this error coming not regularly,liferay running on tomcat, how can i solve this particular ??problem.
I tried adding JAVA_OPTS with the value as -Xms128m -Xmx256m in System Variables, still I am getting the same error (java.lang.OutOfMemoryError: PermGen space) again and again. Any help will be appreciated. I have also read other post in stackoverflow also but it didn't worked out.
Upvotes: 0
Views: 8879
Reputation: 21
You should try to add following line in the Memory ARGS: field in Tomcat setting.
-XX:NewSize=700m -XX:MaxNewSize=700m -Xms1024m -Xmx2048m -XX:MaxPermSize=768m
You can see in the link.
Upvotes: 0
Reputation: 2257
Expecially since Liferay 6.2 it's important to increase the default Perm size from 256mb to 512 mb. 256mb today is not enough to support the Liferay and some plugins.
-XX:MaxPermSize=512m
Upvotes: 3
Reputation: 35557
-Xms1024m -Xmx1024m
are heap size configuration not PermGen
.
-Xms1024m
is minimum heap size and
-Xmx1024m
maximum heap size.
You have to use
-XX:MaxPermSize=256m // now it is 256MB you can increase it
to configure PermGen
Edit:
I am adding this part to address your comment.
What is PermGen?
The permanent generation is special because it holds meta-data describing user classes (classes that are not part of the Java language). Examples of such meta-data are objects describing classes and methods and they are stored in the Permanent Generation. Applications with large code-base can quickly fill up this segment of the heap which will cause java.lang.OutOfMemoryError: PermGen no matter how high your -Xmx and how much memory you have on the machine.
Upvotes: 2
Reputation: 1357
You need to increase the PermGen space in your tomcat.
Use the following Java option:
-XX:MaxPermSize=256m
Refer to this question for more details. It looks similar.
Upvotes: 1