1 Reply Latest reply on Feb 4, 2011 1:20 AM by Scott Marlow

    java.lang.OutOfMemoryError: GC overhead limit exceeded

    infinity2heaven Novice

      I deployed JBoss 6.Final in an instance of Amazon EC2. While the server and a sample weld app just runs fine on my local, I get the following error while the server is starting up (on Amazon EC2 instance, running Fedora Linux 64bit).

       

      My heapspace is set to considerable amount, following this article.

       

      Xms256m -Xmx768m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000

       

      Error:

       

      Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded

                at sun.net.www.ParseUtil.fileToEncodedURL(ParseUtil.java:245) [:1.6.0_17]

                at sun.security.provider.PolicyFile.canonicalizeCodebase(PolicyFile.java:1811) [:1.6.0_17]

                at sun.security.provider.PolicyFile.access$700(PolicyFile.java:264) [:1.6.0_17]

                at sun.security.provider.PolicyFile$7.run(PolicyFile.java:1257) [:1.6.0_17]

                at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_17]

                at sun.security.provider.PolicyFile.getPermissions(PolicyFile.java:1253) [:1.6.0_17]

                at sun.security.provider.PolicyFile.getPermissions(PolicyFile.java:1200) [:1.6.0_17]

                at org.jboss.classloading.spi.vfs.policy.VFSClassLoaderPolicy.getProtectionDomain(VFSClassLoaderPolicy.java:643) [jboss-classloading-vfs.jar:2.2.0.GA]

                at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:625) [jboss-classloader.jar:2.2.0.GA]

                at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:609) [jboss-classloader.jar:2.2.0.GA]

                at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_17]

                at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:608) [jboss-classloader.jar:2.2.0.GA]

                at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:585) [jboss-classloader.jar:2.2.0.GA]

                at org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDelegateLoader.java:156) [jboss-classloader.jar:2.2.0.GA]

                at org.jboss.classloader.spi.filter.FilteredDelegateLoader.doLoadClass(FilteredDelegateLoader.java:141) [jboss-classloader.jar:2.2.0.GA]

                at org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(FilteredDelegateLoader.java:132) [jboss-classloader.jar:2.2.0.GA]

                at org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:461) [jboss-classloader.jar:2.2.0.GA]

                at org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:262) [jboss-classloader.jar:2.2.0.GA]

                at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:161) [jboss-classloader.jar:2.2.0.GA]

                at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:260) [jboss-classloader.jar:2.2.0.GA]

                at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1152) [jboss-classloader.jar:2.2.0.GA]

                at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:886) [jboss-classloader.jar:2.2.0.GA]

                at org.jboss.classloader.spi.base.BaseClassLoader.doLoadClass(BaseClassLoader.java:505) [jboss-classloader.jar:2.2.0.GA]

                at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:450) [jboss-classloader.jar:2.2.0.GA]

                at java.lang.ClassLoader.loadClass(ClassLoader.java:248) [:1.6.0_17]

                at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316) [:1.6.0_17]

                at org.jboss.xnio.OptionMap$Builder.set(org.jboss.xnio.OptionMap:243) [:6.0.0.Final]

                at org.jboss.xnio.metadata.XnioMetaDataHelper.setOption(XnioMetaDataHelper.java:79) [:6.0.0.Final]

                at org.jboss.xnio.metadata.XnioMetaDataHelper.getOptionMap(XnioMetaDataHelper.java:93) [:6.0.0.Final]

                at org.jboss.xnio.metadata.XnioMetaDataHelper.add(XnioMetaDataHelper.java:349) [:6.0.0.Final]

                at org.jboss.xnio.metadata.XnioMetaData.getBeans(XnioMetaData.java:222) [:6.0.0.Final]

                at org.jboss.kernel.plugins.deployment.AbstractKernelDeployment.getBeans(AbstractKernelDeployment.java:234) [jboss-kernel.jar:2.2.0.GA]

       

       

      I'm seeing other problems on a linux server env too. I'll followup with more posts.

        • 1. java.lang.OutOfMemoryError: GC overhead limit exceeded
          Scott Marlow Master

          I've seen that error in the past.  The "java.lang.OutOfMemoryError: GC overhead limit exceeded" exception is trying to tell you that the Java garbage collector ran too frequently.  It didn't actually run out of memory but that performance might be boosted by increasing memory.  Since an exception is thrown for this situation, it is treated like an error.  Since program state could be in question, you might want to restart in response to this error.  Even better, use the Java option -XX:-UseGCOverheadLimit to disable the UseGCOverheadLimit check.