dcsimg
Number of Threads associated with QueueConnections increase over time.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Steve_Lin
Posted On:   Monday, March 25, 2002 02:30 PM

I am running SwiftMQ 2.1.3 with JDK 1.3.1 on RedHat Linux 7.1 I have a QueueReceiver that receives ObjectMessage(s) from a queue. When it processes a message, it invokes methods on named java classes using java reflection. Some of these invoked methods may create more ObjectMessage(s) and send them to other queues. I have a static QueueConnection object that all other classes use to send messages to the queue. This object only gets created once. For some reason, even though I have a static QueueConnection object and all classes use this connection, SwiftMQ seems to create a new QueueConnection class everytime I send a message. Sometimes the Threads associated with these new QueueConnect   More>>

I am running SwiftMQ 2.1.3 with JDK 1.3.1 on RedHat Linux 7.1



I have a QueueReceiver that receives ObjectMessage(s) from a queue. When it processes a message, it invokes methods on named java classes using java reflection. Some of these invoked methods may create more ObjectMessage(s) and send them to other queues.



I have a static QueueConnection object that all other classes use to send messages to the queue. This object only gets created once.



For some reason, even though I have a static QueueConnection object and all classes use this connection, SwiftMQ seems to create a new QueueConnection class everytime I send a message.



Sometimes the Threads associated with these new QueueConnection objects do not die nicely. Then seem to hang in deadlock. Each hanging QueueConnection holds two deadlocked Threads. This causes the number of Threads on the system to increase over time until there are no more resources available.



I have tried to use non-blocking TCP IO mode and that seems to have solved the problem on the SwiftMQ Router side, but on the client side, Threads are still created for QueueConnections that do not die.



I've tried running with both green threads and native threads, both have the same problem. I've tried setting the environment variable, J2SE_PREEMPTCLOSE=1, but that caused my QueueReceiver object to be closed without warning if the invoked java methods do a Runtime().getRuntime().exec() method call and caused normal java ServerSocket objects to receive system interrupts without warning.



Please let me know if there is some way this can be resolved.

   <<Less
About | Sitemap | Contact