4 Replies Latest reply on Oct 17, 2013 9:22 AM by rcollier

    Openfire crashing (java.lang.OutOfMemoryError: Java heap space)

      Hi,

       

      I'm using Openfire 3.8.2, Apache 2.2.15 and CentOS 6.

       

      As tried what is proposed in http://community.igniterealtime.org/thread/49545, (AVA_HOME=/opt/openfire/jre) and Openfire has "Search" plugin installed (by Ryan Graham ).

       

      I'm using Asterisk and Openfire in order to distribute extension state. It works fine until Java runs out of memmory. This is what I found in logs when error happened (note that IP 192.168.2.3 is a false one).

       

      2013.10.15 07:59:36 org.jivesoftware.openfire.nio.ConnectionHandler - ConnectionHandler reports unexpected exception for session: (SOCKET, R: /192.168.1.26:41635, L: /10.34.216.164:5222, S: 0.0.0.0/0.0.0.0:5222)

      java.lang.OutOfMemoryError: Java heap space

              at java.nio.HeapByteBuffer.<init>(Unknown Source)

              at java.nio.ByteBuffer.allocate(Unknown Source)

              at org.apache.mina.common.SimpleByteBufferAllocator$SimpleByteBuffer.capacity0(Sim pleByteBufferAllocator.java:114)

              at org.apache.mina.common.support.BaseByteBuffer.capacity(BaseByteBuffer.java:75)

              at org.apache.mina.common.support.BaseByteBuffer.expand(BaseByteBuffer.java:107)

              at org.apache.mina.common.ByteBuffer.expand(ByteBuffer.java:329)

              at org.apache.mina.common.ByteBuffer.autoExpand(ByteBuffer.java:1801)

              at org.apache.mina.common.ByteBuffer.putString(ByteBuffer.java:1166)

              at org.jivesoftware.openfire.nio.ByteBufferWriter.write(ByteBufferWriter.java:45)

              at java.io.Writer.write(Unknown Source)

              at java.io.Writer.write(Unknown Source)

              at org.jivesoftware.util.XMLWriter.writeNodeText(XMLWriter.java:1034)

              at org.jivesoftware.util.XMLWriter.writeNode(XMLWriter.java:1048)

              at org.jivesoftware.util.XMLWriter.writeElementContent(XMLWriter.java:900)

              at org.jivesoftware.util.XMLWriter.writeElement(XMLWriter.java:780)

              at org.jivesoftware.util.XMLWriter.writeNode(XMLWriter.java:1042)

              at org.jivesoftware.util.XMLWriter.writeElementContent(XMLWriter.java:906)

              at org.jivesoftware.util.XMLWriter.writeElement(XMLWriter.java:786)

              at org.jivesoftware.util.XMLWriter.writeNode(XMLWriter.java:1042)

              at org.jivesoftware.util.XMLWriter.writeElementContent(XMLWriter.java:906)

              at org.jivesoftware.util.XMLWriter.writeElement(XMLWriter.java:786)

              at org.jivesoftware.util.XMLWriter.write(XMLWriter.java:255)

              at org.jivesoftware.openfire.nio.NIOConnection.deliver(NIOConnection.java:257)

              at org.jivesoftware.openfire.session.LocalClientSession.deliver(LocalClientSession .java:843)

              at org.jivesoftware.openfire.session.LocalSession.process(LocalSession.java:281)

              at org.jivesoftware.openfire.spi.RoutingTableImpl.routeToBareJID(RoutingTableImpl. java:503)

              at org.jivesoftware.openfire.spi.RoutingTableImpl.routeToLocalDomain(RoutingTableI mpl.java:284)

              at org.jivesoftware.openfire.spi.RoutingTableImpl.routePacket(RoutingTableImpl.jav a:234)

              at org.jivesoftware.openfire.MessageRouter.route(MessageRouter.java:109)

              at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:80)

              at org.jivesoftware.openfire.pubsub.PubSubModule.sendNotification(PubSubModule.jav a:716)

              at org.jivesoftware.openfire.pubsub.Node.sendEventNotification(Node.java:2040)

       

      2013.10.15 08:03:01 org.jivesoftware.openfire.nio.ConnectionHandler - ConnectionHandler reports unexpected exception for session: (SOCKET, R: /108.23.125.3:54644, L: /10.34.216.164:5222, S: 0.0.0.0/0.0.0.0:5222)

      java.lang.OutOfMemoryError: Java heap space

       

      2013.10.15 08:07:02 org.jivesoftware.openfire.nio.ConnectionHandler - ConnectionHandler reports unexpected exception for session: (SOCKET, R: /55.62.35.7:41635, L: /10.34.216.164:5222, S: 0.0.0.0/0.0.0.0:5222)

      java.lang.OutOfMemoryError: Java heap space

              at java.nio.HeapByteBuffer.<init>(Unknown Source)

              at java.nio.ByteBuffer.allocate(Unknown Source)

              at org.apache.mina.common.SimpleByteBufferAllocator$SimpleByteBuffer.capacity0(Sim pleByteBufferAllocator.java:114)

              at org.apache.mina.common.support.BaseByteBuffer.capacity(BaseByteBuffer.java:75)

              at org.apache.mina.common.support.BaseByteBuffer.expand(BaseByteBuffer.java:107)

              at org.apache.mina.common.ByteBuffer.expand(ByteBuffer.java:329)

              at org.apache.mina.common.ByteBuffer.autoExpand(ByteBuffer.java:1801)

              at org.apache.mina.common.ByteBuffer.putString(ByteBuffer.java:1166)

              at org.jivesoftware.openfire.nio.ByteBufferWriter.write(ByteBufferWriter.java:45)

              at java.io.Writer.write(Unknown Source)

              at java.io.Writer.write(Unknown Source)

              at org.jivesoftware.util.XMLWriter.writeNodeText(XMLWriter.java:1034)

              at org.jivesoftware.util.XMLWriter.writeNode(XMLWriter.java:1048)

              at org.jivesoftware.util.XMLWriter.writeElementContent(XMLWriter.java:900)

              at org.jivesoftware.util.XMLWriter.writeElement(XMLWriter.java:780)

              at org.jivesoftware.util.XMLWriter.writeNode(XMLWriter.java:1042)

              at org.jivesoftware.util.XMLWriter.writeElementContent(XMLWriter.java:906)

              at org.jivesoftware.util.XMLWriter.writeElement(XMLWriter.java:786)

              at org.jivesoftware.util.XMLWriter.writeNode(XMLWriter.java:1042)

              at org.jivesoftware.util.XMLWriter.writeElementContent(XMLWriter.java:906)

              at org.jivesoftware.util.XMLWriter.writeElement(XMLWriter.java:786)

              at org.jivesoftware.util.XMLWriter.write(XMLWriter.java:255)

              at org.jivesoftware.openfire.nio.NIOConnection.deliver(NIOConnection.java:257)

              at org.jivesoftware.openfire.session.LocalClientSession.deliver(LocalClientSession .java:843)

              at org.jivesoftware.openfire.session.LocalSession.process(LocalSession.java:281)

              at org.jivesoftware.openfire.spi.RoutingTableImpl.routeToBareJID(RoutingTableImpl. java:503)

              at org.jivesoftware.openfire.spi.RoutingTableImpl.routeToLocalDomain(RoutingTableI mpl.java:284)

              at org.jivesoftware.openfire.spi.RoutingTableImpl.routePacket(RoutingTableImpl.jav a:234)

              at org.jivesoftware.openfire.MessageRouter.route(MessageRouter.java:109)

              at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:80)

              at org.jivesoftware.openfire.pubsub.PubSubModule.sendNotification(PubSubModule.jav a:716)

              at org.jivesoftware.openfire.pubsub.Node.sendEventNotification(Node.java:2040)

       

       

      2013.10.15 08:07:06 org.jivesoftware.openfire.nio.ConnectionHandler - ConnectionHandler reports unexpected exception for session: (SOCKET, R: /55.62.35.7:41635, L: /10.34.216.164:5222, S: 0.0.0.0/0.0.0.0:5222)

      java.lang.OutOfMemoryError: Java heap space

              at java.nio.HeapByteBuffer.<init>(Unknown Source)

              at java.nio.ByteBuffer.allocate(Unknown Source)

              at org.apache.mina.common.SimpleByteBufferAllocator$SimpleByteBuffer.capacity0(Sim pleByteBufferAllocator.java:114)

              at org.apache.mina.common.support.BaseByteBuffer.capacity(BaseByteBuffer.java:75)

              at org.apache.mina.common.support.BaseByteBuffer.expand(BaseByteBuffer.java:107)

              at org.apache.mina.common.ByteBuffer.expand(ByteBuffer.java:329)

              at org.apache.mina.common.ByteBuffer.autoExpand(ByteBuffer.java:1801)

              at org.apache.mina.common.ByteBuffer.putString(ByteBuffer.java:1166)

              at org.jivesoftware.openfire.nio.ByteBufferWriter.write(ByteBufferWriter.java:45)

              at java.io.Writer.write(Unknown Source)

              at java.io.Writer.write(Unknown Source)

              at org.jivesoftware.util.XMLWriter.writeNodeText(XMLWriter.java:1034)

              at org.jivesoftware.util.XMLWriter.writeNode(XMLWriter.java:1048)

              at org.jivesoftware.util.XMLWriter.writeElementContent(XMLWriter.java:900)

              at org.jivesoftware.util.XMLWriter.writeElement(XMLWriter.java:780)

              at org.jivesoftware.util.XMLWriter.writeNode(XMLWriter.java:1042)

              at org.jivesoftware.util.XMLWriter.writeElementContent(XMLWriter.java:906)

              at org.jivesoftware.util.XMLWriter.writeElement(XMLWriter.java:786)

              at org.jivesoftware.util.XMLWriter.writeNode(XMLWriter.java:1042)

              at org.jivesoftware.util.XMLWriter.writeElementContent(XMLWriter.java:906)

              at org.jivesoftware.util.XMLWriter.writeElement(XMLWriter.java:786)

              at org.jivesoftware.util.XMLWriter.write(XMLWriter.java:255)

              at org.jivesoftware.openfire.nio.NIOConnection.deliver(NIOConnection.java:257)

              at org.jivesoftware.openfire.session.LocalClientSession.deliver(LocalClientSession .java:843)

              at org.jivesoftware.openfire.session.LocalSession.process(LocalSession.java:281)

              at org.jivesoftware.openfire.spi.RoutingTableImpl.routeToBareJID(RoutingTableImpl. java:503)

              at org.jivesoftware.openfire.spi.RoutingTableImpl.routeToLocalDomain(RoutingTableI mpl.java:284)

              at org.jivesoftware.openfire.spi.RoutingTableImpl.routePacket(RoutingTableImpl.jav a:234)

              at org.jivesoftware.openfire.MessageRouter.route(MessageRouter.java:109)

              at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:80)

              at org.jivesoftware.openfire.pubsub.PubSubModule.sendNotification(PubSubModule.jav a:716)

              at org.jivesoftware.openfire.pubsub.Node.sendEventNotification(Node.java:2040)

       

      2013.10.15 08:07:10 org.jivesoftware.openfire.nio.ConnectionHandler - ConnectionHandler reports unexpected exception for session: (SOCKET, R: /55.62.35.7:41635, L: /10.34.216.164:5222, S: 0.0.0.0/0.0.0.0:5222)

      java.lang.OutOfMemoryError: Java heap space

              at java.nio.HeapByteBuffer.<init>(Unknown Source)

              at java.nio.ByteBuffer.allocate(Unknown Source)

              at org.apache.mina.common.SimpleByteBufferAllocator$SimpleByteBuffer.capacity0(Sim pleByteBufferAllocator.java:114)

              at org.apache.mina.common.support.BaseByteBuffer.capacity(BaseByteBuffer.java:75)

              at org.apache.mina.common.support.BaseByteBuffer.expand(BaseByteBuffer.java:107)

              at org.apache.mina.common.ByteBuffer.expand(ByteBuffer.java:329)

              at org.apache.mina.common.ByteBuffer.autoExpand(ByteBuffer.java:1801)

              at org.apache.mina.common.ByteBuffer.putString(ByteBuffer.java:1166)

              at org.jivesoftware.openfire.nio.ByteBufferWriter.write(ByteBufferWriter.java:45)

              at java.io.Writer.write(Unknown Source)

              at java.io.Writer.write(Unknown Source)

              at org.jivesoftware.util.XMLWriter.writeElement(XMLWriter.java:740)

              at org.jivesoftware.util.XMLWriter.writeNode(XMLWriter.java:1042)

              at org.jivesoftware.util.XMLWriter.writeElementContent(XMLWriter.java:906)

              at org.jivesoftware.util.XMLWriter.writeElement(XMLWriter.java:786)

              at org.jivesoftware.util.XMLWriter.writeNode(XMLWriter.java:1042)

              at org.jivesoftware.util.XMLWriter.writeElementContent(XMLWriter.java:906)

              at org.jivesoftware.util.XMLWriter.writeElement(XMLWriter.java:786)

              at org.jivesoftware.util.XMLWriter.write(XMLWriter.java:255)

              at org.jivesoftware.openfire.nio.NIOConnection.deliver(NIOConnection.java:257)

              at org.jivesoftware.openfire.session.LocalClientSession.deliver(LocalClientSession .java:843)

              at org.jivesoftware.openfire.session.LocalSession.process(LocalSession.java:281)

              at org.jivesoftware.openfire.spi.RoutingTableImpl.routeToBareJID(RoutingTableImpl. java:503)

              at org.jivesoftware.openfire.spi.RoutingTableImpl.routeToLocalDomain(RoutingTableI mpl.java:284)

              at org.jivesoftware.openfire.spi.RoutingTableImpl.routePacket(RoutingTableImpl.jav a:234)

              at org.jivesoftware.openfire.MessageRouter.route(MessageRouter.java:109)

              at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:80)

              at org.jivesoftware.openfire.pubsub.PubSubModule.sendNotification(PubSubModule.jav a:716)

              at org.jivesoftware.openfire.pubsub.Node.sendEventNotification(Node.java:2040)

              at org.jivesoftware.openfire.pubsub.NodeAffiliate.sendEventNotification(NodeAffili ate.java:225)

              at org.jivesoftware.openfire.pubsub.NodeAffiliate.sendPublishedNotifications(NodeA ffiliate.java:127)

              at org.jivesoftware.openfire.pubsub.LeafNode.publishItems(LeafNode.java:270)

       

      2013.10.15 08:07:49 org.jivesoftware.openfire.nio.ConnectionHandler - ConnectionHandler reports unexpected exception for session: (SOCKET, R: /55.62.35.7:41635, L: /10.34.216.164:5222, S: 0.0.0.0/0.0.0.0:5222)

      java.lang.OutOfMemoryError: Java heap space

       

      2013.10.15 08:07:49 org.jivesoftware.openfire.nio.ConnectionHandler - ConnectionHandler reports unexpected exception for session: (SOCKET, R: /55.62.35.7:41635, L: /10.34.216.164:5222, S: 0.0.0.0/0.0.0.0:5222)

      java.lang.OutOfMemoryError: Java heap space

       

      2013.10.15 08:07:49 org.jivesoftware.openfire.nio.ConnectionHandler - ConnectionHandler reports unexpected exception for session: (SOCKET, R: /55.62.35.7:41635, L: /10.34.216.164:5222, S: 0.0.0.0/0.0.0.0:5222)

      java.lang.OutOfMemoryError: Java heap space

       

      2013.10.15 08:07:49 org.jivesoftware.openfire.nio.ConnectionHandler - ConnectionHandler reports unexpected exception for session: (SOCKET, R: /55.62.35.7:41635, L: /10.34.216.164:5222, S: 0.0.0.0/0.0.0.0:5222)

      java.lang.OutOfMemoryError: Java heap space

       

      2013.10.15 08:07:49 org.jivesoftware.openfire.nio.ConnectionHandler - ConnectionHandler reports unexpected exception for session: (SOCKET, R: /55.62.35.7:41635, L: /10.34.216.164:5222, S: 0.0.0.0/0.0.0.0:5222)

      java.lang.OutOfMemoryError: Java heap space

       

      2013.10.15 08:07:49 org.jivesoftware.openfire.nio.ConnectionHandler - ConnectionHandler reports unexpected exception for session: (SOCKET, R: /55.62.35.7:41635, L: /10.34.216.164:5222, S: 0.0.0.0/0.0.0.0:5222)

      java.lang.OutOfMemoryError: Java heap space

       

      2013.10.15 08:07:49 org.jivesoftware.openfire.nio.ConnectionHandler - ConnectionHandler reports unexpected exception for session: (SOCKET, R: /55.62.35.7:41635, L: /10.34.216.164:5222, S: 0.0.0.0/0.0.0.0:5222)

      java.lang.OutOfMemoryError: Java heap space

       

      2013.10.15 08:07:49 org.jivesoftware.openfire.nio.ConnectionHandler - ConnectionHandler reports unexpected exception for session: (SOCKET, R: /55.62.35.7:41635, L: /10.34.216.164:5222, S: 0.0.0.0/0.0.0.0:5222)

      java.lang.OutOfMemoryError: Java heap space

       

      2013.10.15 08:07:49 org.jivesoftware.openfire.nio.ConnectionHandler - ConnectionHandler reports unexpected exception for session: (SOCKET, R: /55.62.35.7:41635, L: /10.34.216.164:5222, S: 0.0.0.0/0.0.0.0:5222)

      java.lang.OutOfMemoryError: Java heap space

       

      2013.10.15 08:07:49 org.jivesoftware.openfire.nio.ConnectionHandler - ConnectionHandler reports unexpected exception for session: (SOCKET, R: /55.62.35.7:41635, L: /10.34.216.164:5222, S: 0.0.0.0/0.0.0.0:5222)

      java.lang.OutOfMemoryError: Java heap space

       

      2013.10.15 08:07:49 org.jivesoftware.openfire.nio.ConnectionHandler - ConnectionHandler reports unexpected exception for session: (SOCKET, R: /55.62.35.7:41635, L: /10.34.216.164:5222, S: 0.0.0.0/0.0.0.0:5222)

      java.lang.OutOfMemoryError: Java heap space

       

      2013.10.15 08:07:49 org.jivesoftware.openfire.nio.ConnectionHandler - ConnectionHandler reports unexpected exception for session: (SOCKET, R: /55.62.35.7:41635, L: /10.34.216.164:5222, S: 0.0.0.0/0.0.0.0:5222)

      java.lang.OutOfMemoryError: Java heap space

       

      2013.10.15 08:07:49 org.jivesoftware.openfire.nio.ConnectionHandler - ConnectionHandler reports unexpected exception for session: (SOCKET, R: /55.62.35.7:41635, L: /10.34.216.164:5222, S: 0.0.0.0/0.0.0.0:5222)

      java.lang.OutOfMemoryError: Java heap space

       

      2013.10.15 08:07:49 org.jivesoftware.openfire.nio.ConnectionHandler - ConnectionHandler reports unexpected exception for session: (SOCKET, R: /55.62.35.7:41635, L: /10.34.216.164:5222, S: 0.0.0.0/0.0.0.0:5222)

      java.lang.OutOfMemoryError: Java heap space

       

       

      Don't know what is happening. Why is memory running out?

       

      Thank you very much in advance.

       

      B.