[jboss-user] [JBoss Messaging] - JBoss doesnt release threads after executing MDB (out of Mem

suhail do-not-reply at jboss.com
Thu Dec 21 09:20:51 EST 2006


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) 


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995601#3995601

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995601



More information about the jboss-user mailing list