Author |
Message
|
ashupro |
Posted: Thu Aug 04, 2005 7:03 am Post subject: Sndr.close()&Session.close() not releasing SVRCONN chann |
|
|
Newbie
Joined: 04 Aug 2005 Posts: 3
|
Hello,
I was getting the MQJMS2005 error (Max allotted channels being used up.). I identified couple of places, where QueueSessions were not being closed. These are now fixed, and all sessions are now being closed in the "finally" clause.
But Still, when we monitor the SVRCONN Channels in MQ, new channels are created whenever we create sessions, and these don't seem to be released, even if I close the sender and session objects.
I am wondering if I need to close the connection object as well, each time, to ensure that the CHANNEL is released each time.
We use a common QueueConnection object that is created in the controller servlet in the init method:
m_connection = factory.createQueueConnection();
m_connection.start ();
This object is then saved in ServletContext. For individual requests,
I retrieve the Connection object, create a session object and a sender object as follows:
QueueSession session = m_connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
QueueSender sender = session.createSender(requestQueue);
sender.send(...)
And in finally block, close the objects using
sender.close(), and session.close().
The connection object itself is not closed, as we re-use the connection object across multiple requests. Is this a problem ? Do I need to close the connection object every time (I guess it will be a bit expensive to do that) ?
Is there a CHANNEL caching in MQ that results in the channel not being closed everytime I close a session object ?
Please let me know |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Aug 04, 2005 7:21 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
What version of WMQ are you using (use mqver)? I thought that there were some problems like this that were fixed in CSD4 or later. |
|
Back to top |
|
 |
tealr |
Posted: Thu Aug 04, 2005 8:51 am Post subject: |
|
|
Newbie
Joined: 15 Dec 2004 Posts: 1
|
very good question.
from what I learned, the close method only returns the connection to the pool not necessarily close the connection, so yes the SVRCONN channel will stay up.
As as side note, I created a separate SVRCONN for each qcf instead of allowing them all as instances of SYSTE.DEFAULT.SVRCONN
Im anxious to see if anyone has the answer to your question...
or just a link to some arbitrary document.
lets hope for the former as I would like more info about this also. |
|
Back to top |
|
 |
ashupro |
Posted: Thu Aug 04, 2005 10:24 am Post subject: |
|
|
Newbie
Joined: 04 Aug 2005 Posts: 3
|
We are using MQ Version 5.3 with CSD06
Below is the information I received from my MQ support:
Name: WebSphere MQ
Version: 530.6 CSD06
CMVC level: p530-06-L040211
BuildType: IKAP - (Production) |
|
Back to top |
|
 |
vennela |
Posted: Thu Aug 04, 2005 10:27 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Ask your MQ Admin if they have the right tuning parameters in their qm.ini file (if UNIX). Especially TCP stanza and AdoptNewMCA ... |
|
Back to top |
|
 |
ashupro |
Posted: Thu Aug 04, 2005 11:06 am Post subject: |
|
|
Newbie
Joined: 04 Aug 2005 Posts: 3
|
Do you have anything specific that I should ask my MQ Admin ?
I know that we have the KeepAlive set to YES, and the OS Level TCP/IP Keep Alive is set to few minutes I believe. [That is the reason, my channels are not getting closed immediately by eventually they dissappear.]
What exactly should AdoptNewMCA be set to ? |
|
Back to top |
|
 |
wschutz |
Posted: Thu Aug 04, 2005 11:08 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
There is a "USECONNPOOLING" property you can specify on your connection factory definitions to turn off connection pooling _________________ -wayne |
|
Back to top |
|
 |
|