2 Replies Latest reply on Apr 17, 2016 1:48 PM by wdfink

    Redeploys cause OutofMemory Error

    randhawag

      We are deploying 5-8 modules EAR files on single JBoss EAP 7 Beta instance running  Java 8. After a few redeployments using CLI (command line interface) JBoss runs out of memory, the process does not always die.  We are running JBoss in a docker container and find docker process cannot be stopped either due to OOME. We are expecting JVM memory of previous deployment to be reclaimed by GC but it does not. Has anyone experienced similar issue?

       

      2016-04-06 15:42:26,586 WARN  [com.couchbase.client.deps.io.netty.channel.DefaultChannelPipeline] (cb-io-1-2) An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.: java.lang.OutOfMemoryError: Direct buffer memory

              at java.nio.Bits.reserveMemory(Bits.java:693)

              at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:123)

              at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311)

              at com.couchbase.client.deps.io.netty.buffer.PoolArena$DirectArena.newChunk(PoolArena.java:645)

              at com.couchbase.client.deps.io.netty.buffer.PoolArena.allocateNormal(PoolArena.java:228)

              at com.couchbase.client.deps.io.netty.buffer.PoolArena.allocate(PoolArena.java:204)

        • 1. Re: Redeploys cause OutofMemory Error
          jamezp

          I haven't heard of this happening. Deployments should clean up resources associated with them. However it's possible that something in the deployment can't be GC'd if it itself is holding on to some resource. You'd want to attach a profiler or something to see what's hanging around after a redeploy.

           

          --

          James R. Perkins

          • 2. Re: Redeploys cause OutofMemory Error
            wdfink

            As it is a couchbase Exception I would check this side also.

            As James mentioned a profiler snapshot taken before and after undeploy/redeploy might help to find the issue.

             

            Often it is a problem when applications do something against the spec like thread control or thread-local variables which are not cleaned up.