Author |
Message
|
thestig |
Posted: Tue Mar 25, 2008 1:34 pm Post subject: Orphaned Open handles to Queues on remote QueueManager |
|
|
Newbie
Joined: 08 Aug 2007 Posts: 2
|
HI hope im posting this the correct place.
I have written a short program using the java MQ API that reads a message from some queues on a remote Queue Manager and puts another message on an some output queues on the same remote Queue Manager.
I noticed that if my network cable becomes unpluged. I still see, through MQ explorer, that my machine has an open handles to the queues I am using. more importantly it only seems to affect the queues that i open for output and not the ones for input. Is this because of how access the queues?
I open the input queues using mqopen options
openOption= MQC.MQOO_INQUIRE | MQC.MQOO_INPUT_AS_Q_DEF|MQC.MQOO_FAIL_IF_QUIESCING ;
and the output ones using
openOption = MQC.MQOO_OUTPUT | MQC.MQOO_FAIL_IF_QUIESCING;
are my open options to blame? |
|
Back to top |
|
 |
Gaya3 |
Posted: Tue Mar 25, 2008 7:57 pm Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
There is an attribute called TCPKeepAlive. please set this at MQ Server Level.
Regards
Gayathri _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
thestig |
Posted: Thu Mar 27, 2008 2:55 pm Post subject: |
|
|
Newbie
Joined: 08 Aug 2007 Posts: 2
|
Thanks for the reply
but doesn't the TCPKeepAlive attribute cause the channel to go down?(it's a server connection channel I'm using by the way).
I dont want that. I just want that connection to be closed and not count as one of the open handles.
In any case is there any way I can set that value programatically?
I think the reason I dont have the problem with the input queues is because When I do my GETS I use a wait interval maybe i can do something similar when i do PUTS |
|
Back to top |
|
 |
Vitor |
Posted: Fri Mar 28, 2008 1:28 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
thestig wrote: |
In any case is there any way I can set that value programatically?
I think the reason I dont have the problem with the input queues is because When I do my GETS I use a wait interval maybe i can do something similar when i do PUTS |
Handles are controlled by the OPEN, not the GET or PUT, and the connection to the queue manager (logically enough) is controlled by the CONN call.
Also logically, you can't specify a wait interval on a put because it happens instantly or it doesn't work. The wait interval you mention is the period of time the get calls waits for a message, not how long it waits for the connection to return (which AFAIK it can't see).
Be sure your code is catching 2009 & 2019 errors being returned from any of the MQ calls and disconnects as a response. There's nothing you can do from the application to affect the server (because at this point the network is unpluged and comms are lost) so you need to ensure the SVRCONN is set correctly to detect this loss. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
WingCommanderBadger |
Posted: Fri Mar 28, 2008 7:30 am Post subject: TCP KeepAlive |
|
|
 Apprentice
Joined: 06 Sep 2005 Posts: 32 Location: London, UK
|
Don't forget that the actual config for the TCP KeepAlive settings are made at the O/S level. If I remember correctly, these values are much easier to change on Linux/Unix than on Windows. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Wed Apr 02, 2008 7:47 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
thestig wrote: |
Thanks for the reply
but doesn't the TCPKeepAlive attribute cause the channel to go down?(it's a server connection channel I'm using by the way).
I dont want that. I just want that connection to be closed and not count as one of the open handles.
|
Keep Alive won't touch live channels.
ClientIdle will kill live but inactive channels. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
|