java.lang.OutOfMemoryError: Java heap space

Hey Everyone,

I know there are other posts around this issue and trust me I have read through them all. We have implemented a lot of the different solutions but just cannot seem to get rid of this issue. We are running the embedded database on a Windows 2003 server. It is a dedicated Openfire VM with 3GB of RAM. Our Java version is 1.6.0_18 Sun Microsystems Inc. – Java HotSpot™ Client VM. We have about 350 users using a combination of direct chat and MUC.

We have done the following to try and fix the problem:

  • Upgraded to 3.7.0

  • Set xmpp.pep.enabled = false

  • Adjusted the openfired.vmoptions high and low currently set at -Xms256m -Xmx768m

  • Removed all plugins

  • Adjusted Conversation settings, kicking idle users

  • For a previous issue we did change the embedded db from MEMORY to CACHED

I did add the monitoring plugin back to try to gather more specific information. The admin console shows 6-10% Java memory usage but the server is not stable and jams up after a day. We are getting this string of error messages followed by a bunch of the Java heap space errors over and over:

at org.hsqldb.persist.DataFileCache.get(Unknown Source)
at org.hsqldb.Table$RowStore.get(Unknown Source)
at org.hsqldb.Table.getRow(Unknown Source)
at org.hsqldb.DiskNode.findNode(Unknown Source)
at org.hsqldb.DiskNode.getRight(Unknown Source)
at org.hsqldb.Index.findFirstRow(Unknown Source)
at org.hsqldb.TableFilter.getFirstIterator(Unknown Source)
at org.hsqldb.TableFilter.findFirst(Unknown Source)
at org.hsqldb.Select.buildResult(Unknown Source)
at org.hsqldb.Select.getSingleResult(Unknown Source)
at org.hsqldb.Select.getResult(Unknown Source)
at org.hsqldb.CompiledStatementExecutor.executeSelectStatement(Unknown Source)
at org.hsqldb.CompiledStatementExecutor.executeImpl(Unknown Source)
at org.hsqldb.CompiledStatementExecutor.execute(Unknown Source)
at org.hsqldb.Session.sqlExecuteCompiledNoPreChecks(Unknown Source)
at org.hsqldb.Session.sqlExecute(Unknown Source)
at org.hsqldb.Session.sqlExecute(Unknown Source)
at org.hsqldb.Session.execute(Unknown Source)
at org.hsqldb.jdbc.jdbcPreparedStatement.executeQuery(Unknown Source)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.logicalcobwebs.proxool.ProxyStatement.invoke(
at org.logicalcobwebs.proxool.ProxyStatement.intercept(
at $java.sql.Statement$$EnhancerByProxool$$db73d5bf.executeQuery()
at org.jivesoftware.openfire.vcard.DefaultVCardProvider.loadVCard(DefaultVCardProv
at org.jivesoftware.openfire.vcard.VCardManager.getOrLoadVCard( 39)
at org.jivesoftware.openfire.vcard.VCardManager.getVCard(
at org.jivesoftware.openfire.handler.IQvCardHandler.handleIQ( 20)
at org.jivesoftware.openfire.handler.IQHandler.process(
at org.jivesoftware.openfire.IQRouter.handle(
at org.jivesoftware.openfire.IQRouter.route(
at org.jivesoftware.openfire.spi.PacketRouterImpl.route(
at .java:93)
at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandl
at$TailFilter.messageReceived (
at$EntryImpl$1.messageReceive d(
at org.apache.mina.common.IoFilterAdapter.messageReceived(
at$EntryImpl$1.messageReceive d(
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecF
at$EntryImpl$1.messageReceive d(
at org.apache.mina.filter.executor.ExecutorFilter.processEvent( :239)
at org.apache.mina.filter.executor.ExecutorFilter$
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$ Source)
at Source)
java.lang.OutOfMemoryError: Java heap space

Any help or direction on troubleshooting would be greatly appreciated!



Are you using Openfire’s BOSH for client connections?


Hi Daryl,

I have HTTP binding disabled and the Script Syntax disabled.