Hi guys,

Currently, I am using JBoss AS 4.2.2 and JBoss Messaging 1.4 SP3.
When I put the messaging server under load, the number of the threads were 
increasing until I got "Out of Memory: Unable to create native thread" 



2008-02-29 20:41:10,267 [ERROR] [WorkerThread#26[172.21.101.9:52414]] 
server.endpoint.ServerSessionEndpoint: Failed to prompt delivery
  | 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 
EDU.oswego.cs.dl.util.concurrent.QueuedExecutor.restart(QueuedExecutor.java:142)
  |     at 
EDU.oswego.cs.dl.util.concurrent.QueuedExecutor.execute(QueuedExecutor.java:157)
  |     at 
org.jboss.jms.server.endpoint.ServerSessionEndpoint.promptDelivery(ServerSessionEndpoint.java:1539)
  |     at 
org.jboss.jms.server.endpoint.ServerConsumerEndpoint.promptDelivery(ServerConsumerEndpoint.java:643)
  |     at 
org.jboss.jms.server.endpoint.ServerConsumerEndpoint.changeRate(ServerConsumerEndpoint.java:420)
  |     at 
org.jboss.jms.server.endpoint.advised.ConsumerAdvised.org$jboss$jms$server$endpoint$advised$ConsumerAdvised$changeRate$aop(ConsumerAdvised.java:69)
  |     at 
org.jboss.jms.server.endpoint.advised.ConsumerAdvised$changeRate_N952316153687074823.invokeNext(ConsumerAdvised$changeRate_N952316153687074823.java)
  |     at 
org.jboss.jms.server.container.ServerLogInterceptor.invoke(ServerLogInterceptor.java:105)
  |     at 
org.jboss.jms.server.endpoint.advised.ConsumerAdvised$changeRate_N952316153687074823.invokeNext(ConsumerAdvised$changeRate_N952316153687074823.java)
  |     at 
org.jboss.jms.server.endpoint.advised.ConsumerAdvised.changeRate(ConsumerAdvised.java)
  |     at 
org.jboss.jms.wireformat.ConsumerChangeRateRequest.serverInvoke(ConsumerChangeRateRequest.java:71)
  |     at 
org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:143)
  |     at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:795)
  |     at 
org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:573)
  |     at 
org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:387)
  |     at 
org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
  | 


When I dump the threads, I found many waiting threads. 
 Thread: Thread-5097 : priority:5, demon:false, threadId:20461, 
threadState:WAITING, lockName:[EMAIL PROTECTED]
  | 
  |     java.lang.Object.wait(Native Method)
  |     java.lang.Object.wait(Object.java:485)
  |     EDU.oswego.cs.dl.util.concurrent.LinkedQueue.take(LinkedQueue.java:122)
  |     
EDU.oswego.cs.dl.util.concurrent.QueuedExecutor$RunLoop.run(QueuedExecutor.java:83)
  |     java.lang.Thread.run(Thread.java:619)

In several hours, the number of this kind of threads can be more than 3000 
threads, and they seem waiting forever.


Do you have any idea, why this can be happened? Does my application forget to 
free the threads? In what occasion the waiting threads are created and how to 
notify the threads so they are not waiting anymore?

My application is using client acknowledge. When a message is coming, it will 
be sent to another queue, before acknowledged.

Thank you for your time.

Best Regards,
Hendra

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4133694
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to