powered by Jive Software

java.lang.OutOfMemoryError: unable to create new native thread

error.log:
014.07.28 10:52:31 org.jivesoftware.openfire.nio.ConnectionHandler - ConnectionHandler reports unexpected exception for session: (SOCKET, R: /10.0.14.9:1425, L: /192.168.10.114:5222, S: 0.0.0.0/0.0.0.0:5222)

java.lang.OutOfMemoryError: unable to create new native thread

at java.lang.Thread.start0(Native Method)

at java.lang.Thread.start(Unknown Source)

at com.sun.jndi.ldap.Connection.(Unknown Source)

at com.sun.jndi.ldap.LdapClient.(Unknown Source)

at com.sun.jndi.ldap.LdapClientFactory.createPooledConnection(Unknown Source)

at com.sun.jndi.ldap.pool.Connections.getOrCreateConnection(Unknown Source)

at com.sun.jndi.ldap.pool.Connections.get(Unknown Source)

at com.sun.jndi.ldap.pool.Pool.getPooledConnection(Unknown Source)

at com.sun.jndi.ldap.LdapPoolManager.getLdapClient(Unknown Source)

at com.sun.jndi.ldap.LdapClient.getInstance(Unknown Source)

at com.sun.jndi.ldap.LdapCtx.connect(Unknown Source)

at com.sun.jndi.ldap.LdapCtx.(Unknown Source)

at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(Unknown Source)

at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(Unknown Source)

at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(Unknown Source)

at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(Unknown Source)

at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)

at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)

at javax.naming.InitialContext.init(Unknown Source)

at javax.naming.ldap.InitialLdapContext.(Unknown Source)

at org.jivesoftware.util.JiveInitialLdapContext.(JiveInitialLdapContext.java :43)

at org.jivesoftware.openfire.ldap.LdapManager.getContext(LdapManager.java:548)

at org.jivesoftware.openfire.ldap.LdapManager.findUserDN(LdapManager.java:958)

at org.jivesoftware.openfire.ldap.LdapManager.findUserDN(LdapManager.java:911)

at org.jivesoftware.openfire.ldap.LdapUserProvider.loadUser(LdapUserProvider.java: 106)

at org.jivesoftware.openfire.auth.AuthorizationManager.authorize(AuthorizationMana ger.java:152)

at org.jivesoftware.openfire.net.XMPPCallbackHandler.handle(XMPPCallbackHandler.ja va:128)

at net.za.darkskies.security.sasl.SSPIImpl.completeAuthorization(SSPIImpl.java:161 )

at net.za.darkskies.security.sasl.SSPIImpl.evaluateResponse(Native Method)

at org.jivesoftware.openfire.net.SASLAuthentication.handle(SASLAuthentication.java :368)

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

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

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

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:648)

at org.apache.mina.common.IoFilterAdapter.messageReceived(IoFilterAdapter.java:80)

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:648)

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

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

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:648)

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

at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Execut orFilter.java:283)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)

at java.lang.Thread.run(Unknown Source)

openfire-service.vmoptions:

-Xms512m

-Xmx1606m

-Djava.net.preferIPv4Stack=true

Current Users: 400
hs_err_pid7736.log.zip (5166 Bytes)

Decrease the native thread stack size or

Decrease the Xmx value or

Use a 64 bit JRE.

Use a 64 bit JRE.
I use NTLM patch 32bit

Decrease the Xmx value
Decrease? Then it will fall even faster.

Decrease the native thread stack size

Decrease? Do you have a working example?

With less Xmx you have more native memory available and that’s what you need. The 2GB address space has such limitations.

Look in the “Documents” section for JVM settings.