Author |
Message
|
billybong |
Posted: Tue Nov 28, 2006 2:53 am Post subject: [solved] MDB on WAS not releasing server connection channels |
|
|
 Disciple
Joined: 22 Jul 2005 Posts: 150 Location: Stockholm, Sweden
|
Hi all!
Setup:
-----------------------------------
MQ 5.3
WAS 6.0
Extended Transaction client from 5.3 extra disk.
XA enabled connection factory with pooling ON
1 mdb, 1 listener. The mdb sends a reply using a separate connection factory.
We have a problem in one of our environment where our connection factories dont release the svrconn channels. We're using connection pooling and XA enabled MQ through the ETC, and everything seems to work pretty fine.
The thing is that when new CF's are created, the oldest channels are'nt closed. This causes our server channels to rise in numbers until the queue manager is unable to hand out more, or we close them down manually.
It seems that its the connection factory instanciated by the application code that is the problem. I've bound each CF to a separate channel and its the channel the separate CF uses that leaks. The listener CF seems to work perfectly.
Has anyone here had any similar experience? _________________ IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Integration Developer V6.0
IBM Certified System Administrator - WebSphere MQ V6.0
IBM Certified Solution Developer - WebSphere DataPower
Last edited by billybong on Tue Nov 28, 2006 8:43 am; edited 1 time in total |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Nov 28, 2006 3:32 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Sounds like the code isn't releasing the connection properly. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
billybong |
Posted: Tue Nov 28, 2006 3:36 am Post subject: |
|
|
 Disciple
Joined: 22 Jul 2005 Posts: 150 Location: Stockholm, Sweden
|
I'm quite certain it does. I've been through every manual I could find and the problem shows up during high load, not for every connection factory used. _________________ IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Integration Developer V6.0
IBM Certified System Administrator - WebSphere MQ V6.0
IBM Certified Solution Developer - WebSphere DataPower |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Nov 28, 2006 4:39 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
What FP of MQ 5.3?
What are the properties of the svrconn? What counts as "high load" - how many channel instances per second?
Do you have AdoptNewMCA turned on on the queue manager? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
billybong |
Posted: Tue Nov 28, 2006 4:58 am Post subject: |
|
|
 Disciple
Joined: 22 Jul 2005 Posts: 150 Location: Stockholm, Sweden
|
MQ FP 11
MCAUSER(MUSR_MQADMIN) (dev...)
HBINT(300)
high load is a couple of thousands of messages, I use 10000 in development.
The connection is instanciated for every invokation of the onMessage method and closed before the method returns.
The channels start at 4 and climbs up steadily until I shut the application down. _________________ IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Integration Developer V6.0
IBM Certified System Administrator - WebSphere MQ V6.0
IBM Certified Solution Developer - WebSphere DataPower |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Nov 28, 2006 5:06 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
... A couple of thousand messages.... instantaneously? steadily over a long period of time? steadily over a short period of time? In bursts over a short period of time?
What's the KAINT on the svrconn? Do you have KeepAlive turned on in the Queue Manager?
Also, I assume that you're seeing more connections than are defined in your pool - but you haven't explicitly said so. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
billybong |
Posted: Tue Nov 28, 2006 5:18 am Post subject: |
|
|
 Disciple
Joined: 22 Jul 2005 Posts: 150 Location: Stockholm, Sweden
|
A couple of thousand instantaneously, yes. But this is only during the stress tests, otherwise we use a couple of thousands / hour.
KAINT=Auto, but we're running on Windows(Dev) and Solaris(Test, Prod) and I've read that it only matters on mainframe.
As I understand it from this post the JMS implementation does not use keep alive intervals.
http://www.mqseries.net/phpBB2/viewtopic.php?p=158520&sid=c9a5aed11a03dc7c46615ef04f72cabd
And yes, I see more channels than pools  _________________ IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Integration Developer V6.0
IBM Certified System Administrator - WebSphere MQ V6.0
IBM Certified Solution Developer - WebSphere DataPower |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Nov 28, 2006 5:31 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
If the server is holding the channel instance open due to keep alive logic of some sort, then it may not matter what the client does...
Also, can you see the sockets open on the client side, as well as the server side? or just the server side? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Nov 28, 2006 5:34 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Also, since you're using the ETC, you might want to check for unresolved transactions.
I'm not entirely sure what will happen if your code decides to disconnect before the transaction has been committed completely. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
billybong |
Posted: Tue Nov 28, 2006 5:44 am Post subject: |
|
|
 Disciple
Joined: 22 Jul 2005 Posts: 150 Location: Stockholm, Sweden
|
Running netstat -na I see that the client has some sockets on wait_stopped.
Those does not show on the server, but they both have a bunch of established sockets.
You have a point about the ETC, do you know if its mandatory to shut the "external" connection down or if maybe you should leave it to the transaction?
As it is now I shut it down myself and let the transaction shut the listener connection factory down. _________________ IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Integration Developer V6.0
IBM Certified System Administrator - WebSphere MQ V6.0
IBM Certified Solution Developer - WebSphere DataPower |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Nov 28, 2006 5:53 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Is the problem with the MDB listener svrconn or the svrconn used for the reply message? I thought it was the svrconn used for the reply message.
Also, you are looking the reply QCF up from JNDI, right? You're not manually creating one?
I don't know much about the ETC, sorry. I do know that, in general, you need to pay close attention to your transactional boundaries in JMS particularly when XA is in use. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
billybong |
Posted: Tue Nov 28, 2006 5:59 am Post subject: |
|
|
 Disciple
Joined: 22 Jul 2005 Posts: 150 Location: Stockholm, Sweden
|
Yes, exactly right. Its the JNDI supplied CF that is used for the reply message that is not closing its svrconns.
Thanks for your help Jeff, its appriciated even though I've failed to come up with a solution. _________________ IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Integration Developer V6.0
IBM Certified System Administrator - WebSphere MQ V6.0
IBM Certified Solution Developer - WebSphere DataPower |
|
Back to top |
|
 |
billybong |
Posted: Tue Nov 28, 2006 8:41 am Post subject: |
|
|
 Disciple
Joined: 22 Jul 2005 Posts: 150 Location: Stockholm, Sweden
|
After fiddling around a bit I replaced the connection factory with a queue connection factory, and that seemed to fix the problem. It might be a bug and I will look further into it and raise an APAR if I come to the conclusion it is.
From my understanding there should be no difference between using a CF and a QCF as long as you're using JMS 1.1, the CF just has the advantage of being able to serve "topic destinations" as well as "queue destinations" through its use of the general "destination". _________________ IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Integration Developer V6.0
IBM Certified System Administrator - WebSphere MQ V6.0
IBM Certified Solution Developer - WebSphere DataPower |
|
Back to top |
|
 |
|