Author |
Message
|
sebastia |
Posted: Tue Nov 11, 2008 11:00 am Post subject: MQ Client (Java) does not close its connections |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
Hi, coleagues - I have some trouble with a MQ Client.
His code (Java) loses its "handle" from time to time,
so he re-connects to my MQ Server.
But, from my point of view, all the connections are alive and well !
See "DISPLAY CHSTATUS(name) all" output at end ...
I read about HBINT ...
"For channels with a channel type (CHLTYPE) of SVRCONN or CLNTCONN,
this is the time, in seconds, between heartbeat flows passed from the server MCA when that MCA has issued an MQGET with WAIT on behalf of a client application. This allows the server to handle situations
where the client connection fails during an MQGET with WAIT."
So, HBINT shall not help if there is no GET() operation pending.
*** WHAT PARAMETER SHALL I USE ...
... to close a Channel from the MQ Server part ...
... if there has passed 60 minutes without traffic ??? ***
Thanks for any pointer. S.
=============================================
Code: |
============================================
AMQ8417: Display Channel Status details.
CHANNEL(MY.SVRCONN) CHLTYPE(SVRCONN)
CONNAME(55.66.77.88) CURRENT
RQMNAME( ) STATUS(RUNNING)
SUBSTATE(RECEIVE) XMITQ( )
AMQ8417: Display Channel Status details.
CHANNEL(MY.SVRCONN) CHLTYPE(SVRCONN)
CONNAME(55.66.77.88) CURRENT
RQMNAME( ) STATUS(RUNNING)
SUBSTATE(RECEIVE) XMITQ( )
AMQ8417: Display Channel Status details.
CHANNEL(MY.SVRCONN) CHLTYPE(SVRCONN)
CONNAME(55.66.77.88) CURRENT
RQMNAME( ) STATUS(RUNNING)
SUBSTATE(RECEIVE) XMITQ( )
AMQ8417: Display Channel Status details.
CHANNEL(MY.SVRCONN) CHLTYPE(SVRCONN)
CONNAME(55.66.77.88) CURRENT
RQMNAME( ) STATUS(RUNNING)
SUBSTATE(RECEIVE) XMITQ( )
============================================
|
|
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Nov 11, 2008 11:24 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Have him force to run a disconnect on the old connection before acquiring a new one. Resources do not "just get garbage collected". They should be explicitly released when no longer needed or used.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
sebastia |
Posted: Tue Nov 11, 2008 11:40 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
mr Saper, I promise to try, but...
... it is AS/400 people,
... using RPG,
... another department,
... another manager ...
*** is there any command/parameter ...
... my MQ Server can "close" the channel ??? ***
( )
Yes, you said it right : I am doing "garbage collector" duties ! |
|
Back to top |
|
 |
PeterPotkay |
Posted: Tue Nov 11, 2008 2:12 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
You should use TCP Keep alive and set it to less than the default of 2 hours. This will clean up orphaned connections where the client is gone on the other side.
It will not clean up connections that are not being used. The correct solution there is to have the app disconnect.
If you want to force a disconnect on them, use ClientIdle:
http://www-01.ibm.com/support/docview.wss?rs=171&uid=swg21197630
I would not use this myself. Its a fix to the symptom, not the root problem. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Nov 11, 2008 3:02 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Alternatively and to ease your admin you could do following:
Force the app to use it's own svrconn channel. (I hope it already does)
When the connections get to many force shutdown the channel and reopen it.
The trouble is that it also closes healthy instances of the channel. In your support though you can force this on them until they change the app to disconnect.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Tue Nov 11, 2008 4:48 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sebastia wrote: |
mr Saper, I promise to try, but...
... it is AS/400 people,
... using RPG,
... another department,
... another manager ...
|
...and your MQ server!!
I do understand your pain, have personal experience of similar circumstances and can only offer sympathy (and advise on trout technique!)
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sebastia |
Posted: Tue Nov 11, 2008 10:04 pm Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
mr Peter - I shall read about "Keep Alive", thanks.
mr Saper - this is exactly what we do now, and the App have to "understand" when I close a "good" connection, but complain a little. They say Java sees an empty pointer and it is not their code fault.
*** Is there anny way to prove this ? ***
( I am trying to get their code, even it is RPG ... )
mr Vitor - thanks for your sympathy ( ) - just a short question ( my english is not good enough ) - what is "trout technique" ?
My dictionary says it is a fish, so I guess I still dont know that mechanism.
I guess you refer to forced shutdown of the channel ...
Thanks 2 all. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Nov 12, 2008 1:51 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sebastia wrote: |
mr Vitor - thanks for your sympathy ( ) - just a short question ( my english is not good enough ) - what is "trout technique" ?
My dictionary says it is a fish, so I guess I still dont know that mechanism.
I guess you refer to forced shutdown of the channel ...
|
Perhaps regretably it's not a recognised technique. It's a shorthand used on the board like LOL or RTFM, which encapsulates the need to take team members (often management) and "persuade" them to take action.
If you search the forum, you'll find the full story of "the trout". I apologise if I've confused you, and that I have no other technical solution to offer you that hasn't been offered by my honoured associates.
FWIW in your position I'd "trout" by pushing back on the other team and getting them to make some changes to their connection code. Accepting the difficulties this engenders. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sebastia |
Posted: Wed Nov 12, 2008 12:00 pm Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
Thanks, mr Vitor.
Today I had the chance to chat with mr T-Rob in Barcelona WSTC
( his speech was about HA for MQ and MB in misc envirs )
and his recomendation is to work with HBINT and KeepAlive.
About the "trout", I shall try to get a glance on the RPG code !
Cheers. |
|
Back to top |
|
 |
|