You can play around with these settings: http://stackoverflow.com/questions/8356416/xxmaxpermsize-with-or-without-xxpermsize
We ran into the same problem at my last company. Turns out it had to do with the way Hive Server was loading jars, IIRC it was because Hive was loading the same class definitions for every request, so they built up over time. You should profile your application (examine its memory) to see if this is the same issue (probably is). On Mon, Feb 8, 2016 at 2:32 PM, mahender bigdata < mahender.bigd...@outlook.com> wrote: > > Any update on this error. has anyone faced this issue > > > > On 2/7/2016 1:53 PM, mahender bigdata wrote: > > Hi Team, > > We are continuously getting *"PermGen space" *error. We have increased > Mapper and its Heap size also. but no luck. we are using hive 1.2. > > When i search in google, it has been said that preserved memory has > exceeded. our cluster is 4 nodes, each 4 cpu core and 7 GB RAM. File or > internal table is in MB only. > > Is there a way to increase *-XX: PermSize, *What settings should i keep > to resolve this error > > > Exception in thread "main" java.lang.OutOfMemoryError: PermGen space > at java.lang.ClassLoader.defineClass1(Native Method) > at java.lang.ClassLoader.defineClass(ClassLoader.java:800) > at > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) > at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) > at java.net.URLClassLoader.access$100(URLClassLoader.java:71) > at java.net.URLClassLoader$1.run(URLClassLoader.java:361) > at java.net.URLClassLoader$1.run(URLClassLoader.java:355) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:354) > at java.lang.ClassLoader.loadClass(ClassLoader.java:425) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) > at java.lang.ClassLoader.loadClass(ClassLoader.java:358) > at > org.apache.hadoop.hive.ql.session.SessionState.close(SessionState.java:1467) > at > org.apache.hadoop.hive.cli.CliSessionState.close(CliSessionState.java:66) > at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:683) > at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:621) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at org.apache.hadoop.util.RunJar.run(RunJar.java:221) > at org.apache.hadoop.util.RunJar.main(RunJar.java:136) > > > >