Java OutOfMemoryError: Failed to fork OS thread

Solution Verified - Updated -

Issue

  • Over the last few weeks, we have encountered several OutOfMemory exceptions in our JBoss instances.
  • The exception from the JBoss server log when the JVM crashed:
    DEBUG [org.jboss.jms.client.JBossConnectionConsumer] 
    Connection consumer closing due to error in listening thread
    JBossConnectionConsumer[fa-bqoma91g-1-yayga91g-ot4k0a-4347a, 8]
    java.lang.OutOfMemoryError: Failed to fork OS thread
            at java.lang.Thread.startImpl(Native Method)
            at java.lang.Thread.start(Thread.java:979)
            at EDU.oswego.cs.dl.util.concurrent.PooledExecutor.addThread(PooledExecutor.java:521)
            at EDU.oswego.cs.dl.util.concurrent.PooledExecutor.execute(PooledExecutor.java:904)
            at org.jboss.jms.asf.StdServerSession.start(StdServerSession.java:397)
            at org.jboss.jms.client.JBossConnectionConsumer.run(JBossConnectionConsumer.java:297)
            at java.lang.Thread.run(Thread.java:810)
    
  • I have the core files that appear to have resulted from the out of memory.

Environment

  • JBoss Enterprise Application Platform (EAP) 4.3 CP02
  • OS: AIX 5.3,ppc
  • Java version: 1.5.0,IBM Corporation
  • Java VM: IBM J9 VM 2.3,IBM Corporation
  • ulimit values for the user:
    time(seconds)        unlimited
    file(blocks)         2097151
    data(kbytes)         131072
    stack(kbytes)        32768
    memory(kbytes)       32768
    coredump(blocks)     2097151
    nofiles(descriptors) 2000
    

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content