OutOfMemoryError initializing HornetQ on OpenShift WildFly 8.2

Saw this error starting up my JMS queue on WildFly 8.2 running on OpenShift:

2015-01-02 21:03:46,417 WARN  [org.hornetq.ra] (default-threads - 1) HQ152005: Failure in HornetQ activation org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQResourceAdapter@b1dce2 destination=jms/queue/spot destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID=null user=null maxSession=15): java.lang.OutOfMemoryError: unable to create new native thread
        at java.lang.Thread.start0(Native Method) [rt.jar:1.8.0_05]

Based on this thread, a suggestions was to reduce the JMS thread pool – my current config (possibly carried over from my prior deployment on WildFly 8.1)

<subsystem xmlns="urn:jboss:domain:messaging:2.0">            <hornetq-server>
   <journal-file-size>102400</journal-file-size>
   <thread-pool-max-size>${messaging.thread.pool.max.size}</thread-pool-max-size>
   <scheduled-thread-pool-max-size>${messaging.scheduled.thread.pool.max.size}</scheduled-thread-pool-max-size>

So based on the recommendation in the linked post above, I set thread-pool-max-size and scheduled-thread-pool-max-size to 20 and this fixed my OutOfMemory issue.

3 Replies to “OutOfMemoryError initializing HornetQ on OpenShift WildFly 8.2”

  1. Great! Just a question, did you replaced the variables or did you set it on some .properties file? I can´t find the right place to set the variable. Thanks

  2. Relating to your problem above how many threads did you reach before you got
    java.lang.OutOfMemoryError: unable to create new native thread

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.