OutOfMemoryError: GC overhead limit exceeded

Hi, I just upgraded to the last nightly build of openfire. Server was working fine from Monday. Yesterday it is crushed with OutOfMemoryError: GC overhead limit exceeded. Logs has lots of entries like:

2007.08.30 23:06:21 org.jivesoftware.openfire.nio.ConnectionHandler.exceptionCaught(ConnectionHandle r.java:109)

java.lang.OutOfMemoryError: GC overhead limit exceeded

at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:39)

at java.nio.ByteBuffer.allocate(ByteBuffer.java:312)

at org.apache.mina.common.SimpleByteBufferAllocator.allocate(SimpleByteBufferAlloc ator.java:45)

at org.apache.mina.common.ByteBuffer.allocate(ByteBuffer.java:222)

at org.apache.mina.common.ByteBuffer.allocate(ByteBuffer.java:211)

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

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

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

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

at org.jivesoftware.openfire.roster.Roster.broadcastPresence(Roster.java:587)

at org.jivesoftware.openfire.handler.PresenceUpdateHandler.broadcastUpdate(Presenc eUpdateHandler.java:281)

at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateH andler.java:122)

at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateH andler.java:110)

at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateH andler.java:174)

at org.jivesoftware.openfire.PresenceRouter.handle(PresenceRouter.java:120)

at org.jivesoftware.openfire.PresenceRouter.route(PresenceRouter.java:66)

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

at org.jivesoftware.openfire.net.StanzaHandler.processPresence(StanzaHandler.java: 321)

at org.jivesoftware.openfire.net.ClientStanzaHandler.processPresence(ClientStanzaH andler.java:85)

at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:245)

at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:167)

at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandl er.java:132)

at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived (AbstractIoFilterChain.java:569)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:647)

at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimplePr otocolDecoderOutput.java:58)

at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecF ilter.java:177)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:647)

at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java :239)

2007.08.30 23:06:33 org.jivesoftware.openfire.audit.spi.AuditorImpl$SaveQueuedPacketsTask.run(Audito rImpl.java:334) Internal server error

java.lang.OutOfMemoryError: GC overhead limit exceeded

at java.lang.StringCoding$StringEncoder.encode(StringCoding.java:232)

at java.lang.StringCoding.encode(StringCoding.java:272)

at java.lang.String.getBytes(String.java:947)

at java.io.UnixFileSystem.list(Native Method)

at java.io.File.list(File.java:973)

at java.io.File.listFiles(File.java:1090)

at org.jivesoftware.openfire.audit.spi.AuditorImpl.ensureMaxTotalSize(AuditorImpl. java:194)

at org.jivesoftware.openfire.audit.spi.AuditorImpl.prepareAuditFile(AuditorImpl.ja va:172)

at org.jivesoftware.openfire.audit.spi.AuditorImpl.saveQueuedPackets(AuditorImpl.j ava:344)

at org.jivesoftware.openfire.audit.spi.AuditorImpl.access$200(AuditorImpl.java:30)

at org.jivesoftware.openfire.audit.spi.AuditorImpl$SaveQueuedPacketsTask.run(Audit orImpl.java:331)

at java.util.TimerThread.mainLoop(Timer.java:512)

at java.util.TimerThread.run(Timer.java:462)

2007.08.30 23:06:53 org.jivesoftware.openfire.nio.ConnectionHandler.exceptionCaught(ConnectionHandle r.java:109)

java.lang.OutOfMemoryError: GC overhead limit exceeded

at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:39)

at java.nio.ByteBuffer.allocate(ByteBuffer.java:312)

at org.apache.mina.common.SimpleByteBufferAllocator.allocate(SimpleByteBufferAlloc ator.java:45)

at org.apache.mina.common.ByteBuffer.allocate(ByteBuffer.java:222)

at org.apache.mina.common.ByteBuffer.allocate(ByteBuffer.java:211)

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

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

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

at org.jivesoftware.openfire.muc.spi.LocalMUCRole.send(LocalMUCRole.java:254)

at org.jivesoftware.openfire.muc.spi.LocalMUCRoom.broadcast(LocalMUCRoom.java:950)

at org.jivesoftware.openfire.muc.cluster.BroascastPresenceRequest.run(BroascastPre senceRequest.java:52)

at org.jivesoftware.openfire.muc.spi.LocalMUCRoom.broadcastPresence(LocalMUCRoom.j ava:924)

at org.jivesoftware.openfire.muc.spi.LocalMUCRoom.presenceUpdated(LocalMUCRoom.jav a:1451)

at org.jivesoftware.openfire.muc.spi.LocalMUCUser.process(LocalMUCUser.java:520)

at org.jivesoftware.openfire.muc.spi.LocalMUCUser.process(LocalMUCUser.java:163)

at org.jivesoftware.openfire.muc.spi.MultiUserChatServerImpl.processPacket(MultiUs erChatServerImpl.java:243)

at org.jivesoftware.openfire.muc.spi.MultiUserChatServerImpl.process(MultiUserChat ServerImpl.java:223)

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

at org.jivesoftware.openfire.PresenceRouter.handle(PresenceRouter.java:136)

at org.jivesoftware.openfire.PresenceRouter.route(PresenceRouter.java:66)

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

at org.jivesoftware.openfire.net.StanzaHandler.processPresence(StanzaHandler.java: 321)

at org.jivesoftware.openfire.net.ClientStanzaHandler.processPresence(ClientStanzaH andler.java:85)

at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:245)

at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:167)

at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandl er.java:132)

at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived (AbstractIoFilterChain.java:569)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:647)

at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimplePr otocolDecoderOutput.java:58)

at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecF ilter.java:177)

/code

I searched community for the solution, but not found anything helpful. We are running on 64-bit Linux system with 8Gb of memory. We added -Xmx512M -Xms512M to the server params. Our application is heavily using MUC service. Yesterday we had 900 concurrent users. There was one room with about 150 users and 15 rooms with about 40 users in each. Any help is appreciated.

Thx,

Tim

In this forum thread http://www.nabble.com/What-the-…–%22java.lang.OutOfMemoryError:-GC-overhead-l imit-exceeded%22-t4238104.html problem was resolved by upgrading to java 1.6.0_02. I’ll try this next week.