Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

java.lang.OutOfMemoryError: PermGen space error in ambari, at that time ambari hung.

java.lang.OutOfMemoryError: PermGen space error in ambari, at that time ambari hung.

I am trying to add the parameter "-Xmx4096m -XX:PermSize=128m -XX:MaxPermSize=128m" to ambari-env file. If my ambari server is having 16GB of RAM, how much i can give -Xmx?

2 REPLIES 2

Re: java.lang.OutOfMemoryError: PermGen space error in ambari, at that time ambari hung.

Mentor

Are you running any other services on Ambari? If not, leave 2-4gb for OS.

Re: java.lang.OutOfMemoryError: PermGen space error in ambari, at that time ambari hung.

Super Collaborator

This is a PermGen space issue. Usually not caused by a memory leak, the permanent generation space is use for class loading, string literals, etc. The amount of RAM on the VM should not really affect your decision on this number.

Instead, give it increments that make sense. Try increasing to 256m as the maximum and see if the problem is resolved. If not, then something else is going on here.

Can you give some background in what you were doing at the time?

Also, you can try switching to JDK 8 which no longer uses permanent generation.