1 Reply Latest reply on Nov 23, 2009 1:55 PM by Jana -

    JBoss doesnt release threads after executing MDB (out of Mem

    Suhail Khaki Newbie

      Hi,
      I am using JBoss AS jboss-4.0.2.
      I am getting OutOfMemoryError when I send the messages to an MDB. It happens after i send 30-40 messages. What I have observed on the web-console of Jboss is that #Threads increases by some 30 whenever I sent one message to a queue. Even though message is getting consumed instantly, the thread count doesn?t come down but keep on increasing by a factor of approx 30 or more with each message. After sometime it reaches some 2000 figure and server starts giving out of memory error. If I make process synchronous (I mean not use MDB) , thread count doesnt increase.
      It implies that each message is adding approx. 30 threads and threads are not released after messages are getting consumed. Can anybody explain it and give a fix ?
      Please find the stack of errors below. I get either of these two stacks.

      Any help will be appreciated.
      Thank you
      Suhail

      20 Dec 2006 16:20:10,176 WARN (UILServerILService Accept Thread:) [org.jboss.mq.il.uil2.UILServerILService] Unexpected error in setup of client connection
      java.lang.OutOfMemoryError: unable to create new native thread
      at java.lang.Thread.start0(Native Method)
      at java.lang.Thread.start(Thread.java:574)
      at org.jboss.mq.il.uil2.SocketManager.start(SocketManager.java:147)
      at org.jboss.mq.il.uil2.UILServerILService.run(UILServerILService.java:162)
      at java.lang.Thread.run(Thread.java:595)


      20 Dec 2006 13:18:35,031 ERROR (TimeoutFactory-0:) [org.jboss.logging.Log4jService$ThrowableListenerLoggingAdapter] Unhandled Throwable
      org.jboss.util.threadpool.ThreadPoolFullException: java.lang.OutOfMemoryError: unable to create new native thread
      at org.jboss.util.threadpool.BasicThreadPool.execute(BasicThreadPool.java:417)
      at org.jboss.util.threadpool.BasicThreadPool.runTaskWrapper(BasicThreadPool.java:192)
      at org.jboss.util.threadpool.BasicThreadPool.run(BasicThreadPool.java:212)
      at org.jboss.util.threadpool.BasicThreadPool.run(BasicThreadPool.java:206)
      at org.jboss.util.timeout.TimeoutFactory.doWork(TimeoutFactory.java:223)
      at org.jboss.util.timeout.TimeoutFactory.access$000(TimeoutFactory.java:41)
      at org.jboss.util.timeout.TimeoutFactory$1.run(TimeoutFactory.java:136)

        • 1. Re: JBoss doesnt release threads after executing MDB (out of
          Jana - Newbie

          Any help would be appreciated...

          18:53:14,303 LServerILServiceWARN : Unexpected error in setup of client connection
          java.lang.OutOfMemoryError: unable to create new native thread
           at java.lang.Thread.start0(Native Method)
           at java.lang.Thread.start(Thread.java:597)
           at org.jboss.mq.il.uil2.SocketManager.start(SocketManager.java:145)
           at org.jboss.mq.il.uil2.UILServerILService.run(UILServerILService.java:171)
           at java.lang.Thread.run(Thread.java:619)
          

          JBoss 4.2.1.GA
          james-2.3.1