2 Replies Latest reply on Mar 17, 2005 2:11 PM by sanjuthomas

    (URGENT) JBoss memory leak

    sanjuthomas Newbie

      Hi all,

      We are using jboss-3.2.1_tomcat-4.1.24 version in Linux box with j2sdk1.4.2_01, and postgresql-7.3.4 as database. We allotted 1024MB memory to the deault instance. When it starts its taking only about 100 MBs. After some time the memory consumption will start to increase and with in 100 hrs, the whole memory will be exhausted. We are running the same application in another instance, that one is working fine for a very long time. Only this instance is eating up memory and eventually ends in OutOfMemoryError. Because of this we are forced to restart the application in every 50 hrs. We are using Apache 1.3 and mod_jk2 module to forward request to JBoss. Any one know what is happening ? We are not able to find the probelm or we dont know which way to proceed.

      The only clue the JBoss left behind is this log


      2005-03-13 22:45:40,680 ERROR [org.apache.tomcat.util.threads.ThreadPool] Caught exception executing org.apache.jk.common.SocketConnection@1e6e3cb, terminating thread
      java.lang.OutOfMemoryError
      2005-03-13 22:50:04,905 ERROR [org.jboss.ejb.plugins.LogInterceptor] Unexpected Error:
      java.lang.OutOfMemoryError
      2005-03-13 22:57:31,217 ERROR [STDERR] Unknown Response Type S ( this is from postgres)
      2005-03-13 22:57:31,218 ERROR [STDERR] at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:123)
      2005-03-13 22:57:31,218 ERROR [STDERR] at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:482)
      2005-03-13 22:57:31,218 ERROR [STDERR] at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:461)
      2005-03-13 22:57:31,219 ERROR [STDERR] at org.postgresql.jdbc1.AbstractJdbc1Connection.rollback(AbstractJdbc1Connection.java:1031)
      2005-03-13 22:57:31,219 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.rollback(LocalManagedConnection.java:116)
      2005-03-13 22:57:31,219 ERROR [STDERR] at org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.rollback(TxConnectionManager.java:859)
      2005-03-13 22:57:31,219 ERROR [STDERR] at org.jboss.tm.TransactionImpl.rollbackResources(TransactionImpl.java:1648)
      2005-03-13 22:57:31,219 ERROR [STDERR] at org.jboss.tm.TransactionImpl.rollback(TransactionImpl.java:448)
      2005-03-13 22:57:31,219 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:361)
      2005-03-13 22:57:31,219 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:253)
      2005-03-13 22:57:31,219 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:74)
      2005-03-13 22:57:31,219 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:92)
      2005-03-13 22:57:31,220 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
      2005-03-13 22:57:31,220 ERROR [STDERR] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
      2005-03-13 22:57:31,220 ERROR [STDERR] at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:477)

      If any one can give any clue or suggestion , it would be great help.
      Thanx in advance,
      Sanju.

        • 1. Re: (URGENT) JBoss memory leak
          Clebert Suconic Master

          It's hard to give you overal just by looking at this message.

          In my opinion, (please... IMHO), this looks like a problem to support guys, consultants, or someone who is working closely to the problem. This requires time... I think it will be hard you get some help from the community. (And that's why we offer support)

          Well... anyway... the only I could tell you is... try to use a profiler to find where the memory-leak is. If you use JBoss-profiler, you will be able to see where you are collecting memory and not releasing it.

          Another thing it could be possible is Session utilization.


          Well... these are just some clues I could think about


          Clebetrt

          • 2. Re: (URGENT) JBoss memory leak
            sanjuthomas Newbie

            Hi Clebetrt,

            Thank You for your replay. Still I don't understand, why this is happening only in one instance. The same application is running fine on another instance for a very long time. Its still running. Any way I will use JBoss-profiler and will post the result here.
            Thank You,
            Sanju