7 Replies Latest reply on May 5, 2014 5:53 AM by Wolf-Dieter Fink

    java.lang.OutOfMemoryError: GC overhead limit exceeded on JBoss AS 4.2.3

    Jakub Maly Newbie

      Dear all,

       

      I have a question about error:

       

      <source>java.lang.OutOfMemoryError: GC overhead limit exceeded</source>

       

      Our application runs on JBoss AS 4.2.3, where are deployed also another services, such as Jbpm 3.2.2 and ESB 4.5.GA. We have several deploys on production and among other problems there started to happen this problem on one of the environments. It's HW configuration shall be enough (16GB Ram, 16 CPU cores). JVM options are:

       

      {quote}export JAVA_OPTS="-Xms1024m -Xmx2048m -XX:MaxPermSize=512m -Djava.awt.headless=true"{quote}

       

      It happens twice till this time. Once I found that 20 minutes before OOME was raised there started problems with Connection Pool:

      2010-11-03 17:31:59,111 WARN  [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Destroying connection that could not be successfully matched:

      {quote}2010-11-03 17:31:59,111 WARN   [org.jboss.resource.connectionmanager.JBossManagedConnectionPool]  Destroying connection that could not be successfully matched:{quote}

       

      The other incindent this problem didn't happened.

       

      Stacktrace of Error itself follows (same for both cases, but the source of cause differs):

       

      {quote}Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
          at java.util.Arrays.copyOf(Arrays.java:2882)
          at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
          at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
          at java.lang.StringBuffer.append(StringBuffer.java:224)
          at org.hibernate.pretty.Formatter.out(Formatter.java:257)
          at org.hibernate.pretty.Formatter.misc(Formatter.java:216)
          at org.hibernate.pretty.Formatter.format(Formatter.java:178)
          at org.hibernate.jdbc.AbstractBatcher.format(AbstractBatcher.java:433)
          at org.hibernate.jdbc.AbstractBatcher.log(AbstractBatcher.java:424)
          at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:505)
          at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:446)
          at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:140)
          at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
          at org.hibernate.loader.Loader.doQuery(Loader.java:673)
          at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
          at org.hibernate.loader.Loader.loadCollection(Loader.java:1994)
          at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:36)
          at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:565)
          at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60)
          at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1716)
          at org.hibernate.collection.AbstractPersistentCollection.forceInitialization(AbstractPersistentCollection.java:454)
          at org.hibernate.engine.StatefulPersistenceContext.initializeNonLazyCollections(StatefulPersistenceContext.java:844)
          at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:241)
          at org.hibernate.loader.Loader.doList(Loader.java:2220)
          at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
          at org.hibernate.loader.Loader.list(Loader.java:2099)
          at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
          at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
          at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
          at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
          at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
          at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:65)

      {quote}

       

      Any ideas, how to fix or what is the cause of the problem?

       

      Thank you for any commets.

       

      Jakub.