| Author | Message | 
		
		  | wmquser | 
			  
				|  Posted: Thu Aug 28, 2008 5:15 am    Post subject: to close orphan svrconn chl. |   |  | 
		
		  | Apprentice
 
 
 Joined: 20 Aug 2008Posts: 32
 
 
 | 
			  
				| We have a demon java apps polling for every 5 sec, connects to the MQ via server connection channel.The java app and the MQ are running in different server across network. If the connection is lost due to network issue, the server connection channel is not ending and a new server connection channel is activated and old remains for ever which results in reaching the max channel count. Please advise how to close the orphaned server connection channels. |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | RogerLacroix | 
			  
				|  Posted: Thu Aug 28, 2008 7:49 am    Post subject: |   |  | 
		
		  |  Jedi Knight
 
 
 Joined: 15 May 2001Posts: 3265
 Location: London, ON  Canada
 
 | 
			  
				| Hi, 
 Tell the developer that even if the application receives an exception issue a disconnect on the old connection (and maybe a close queue too) before reconnecting.  The orphan connections will go away.
 
 Regards,
 Roger Lacroix
 Capitalware Inc.
 _________________
 Capitalware: Transforming tomorrow into today.
 Connected to MQ!
 Twitter
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | PeterPotkay | 
			  
				|  Posted: Thu Aug 28, 2008 8:33 am    Post subject: |   |  | 
		
		  |  Poobah
 
 
 Joined: 15 May 2001Posts: 7723
 
 
 | 
			  
				| If the client just "blinks away" with no chance of issuing MQDISC, the SVRCONN channel on the QM side will be left behind. To automatically clean these up, turn on the server's TCP Keep Alive, and tell the MQ Queue Manager to use Keep Alive. _________________
 Peter Potkay
 Keep Calm and MQ On
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | wmquser | 
			  
				|  Posted: Thu Aug 28, 2008 10:31 pm    Post subject: |   |  | 
		
		  | Apprentice
 
 
 Joined: 20 Aug 2008Posts: 32
 
 
 | 
			  
				| From the java app error logs, we receive the exceptions mqrc 2009 followed by 2019, and the app try reconnects. We have set the TCP Keep alive in qm.ini and the server connection chl - HBINT(300), KAINT(AUTO). But still the old/orphane sever connection chl remains with status running.
 
 After an hour the orphan channels disappears.
 
 But still one hour, is quiet a long time as the channels are piling up.
 We also tried to change KAINT value to 10 sec.But couldnt find any difference.
 
 Any other thoughts? pls suggest.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | PeterPotkay | 
			  
				|  Posted: Fri Aug 29, 2008 5:35 am    Post subject: |   |  | 
		
		  |  Poobah
 
 
 Joined: 15 May 2001Posts: 7723
 
 
 | 
			  
				| KAINT only applies to SVRCONN channels on the mainframe. The only thing you can tell the QM to do is use the system's Keep Alive settings. If the server has Keep Alive on, the QM will use that value.
 
 We have all our MQ servers' Keep Alive set to 15 minutes. Looks like yours is set to 1 hour.
 
 Contact your Server Adminsitrator and ask them to change the value if you don't want to wait an hour.
 
 TCP Keep Alive is a fix to a symptom, orphaned conections. 99% the root cause of these orphaned connections is that the program is not cleanly closing its queues and the disconnecting from the QM. Remember, the app code has to close and disconnect when things end normally, AND when your program encounters an error (if possible).
 
 Keep Alive is then there to catch the scenarios where your app couldn't execute its close and disconnects, i.e. network drop, your server blows up, etc.
 _________________
 Peter Potkay
 Keep Calm and MQ On
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Rahul999 | 
			  
				|  Posted: Thu Nov 13, 2008 12:25 am    Post subject: |   |  | 
		
		  |  Centurion
 
 
 Joined: 14 Mar 2007Posts: 134
 
 
 | 
			  
				| Hi All, 
 We are also facing the same problem.
 I just wanted to know whether activating the KeepAlive  in QM.ini will close the "Running" server connection channel.
 I mean we are having 100's of server connection channels and all are in running state. And that's why we run out of channel every few days.
 So, I was just wondering whether setting KeepAlive will also stop the running "Server Connection Channel" ?
 
 Regards,
 Rahul
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | PeterPotkay | 
			  
				|  Posted: Thu Nov 13, 2008 5:02 am    Post subject: |   |  | 
		
		  |  Poobah
 
 
 Joined: 15 May 2001Posts: 7723
 
 
 | 
			  
				| It will not. 
 The application needs to stop opening a new connection to the QM for every transactions and not closing the previous one.
 
 We use Capitalware's MQAUSX on all are SVRCONN channels to limit each individual SVRCONN channel to 100 or less. Now when a new app comes on board and is not coded properly, they only max out their own channel, I get an alert for an MQAUSX Event message, and every other app is fine.
 
 MQ 7.0 has the ability to limit the # of instances a channel without using an exit, but I don't think it has the ability to raise an Event for this scenario.
 _________________
 Peter Potkay
 Keep Calm and MQ On
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | sebastia | 
			  
				|  Posted: Thu Nov 13, 2008 10:27 am    Post subject: |   |  | 
		
		  |  Grand Master
 
 
 Joined: 07 Oct 2004Posts: 1003
 
 
 | 
			  
				| Peter - could you be a bit more specific .... ? 
 The key sentence is
 "turn on the server's TCP Keep Alive, and tell the QM to use Keep Alive"
 
 a) turn on the server's TCP Keep Alive - how is it done ? (on windows)
 
 b) tell the MQ Queue Manager to use Keep Alive - how is it done ?
 
 Thanks. Seb.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | PeterPotkay | 
			  
				|  Posted: Thu Nov 13, 2008 1:16 pm    Post subject: |   |  | 
		
		  |  Poobah
 
 
 Joined: 15 May 2001Posts: 7723
 
 
 | 
			  
				| 
   
	| sebastia wrote: |  
	| a) turn on the server's TCP Keep Alive - how is it done ? (on windows)
 
 |  Dunno. I asked my server guys to do it and they obliged. Mr. Google will help if you need to do it yourself.
 
 
 
   
	| sebastia wrote: |  
	| b) tell the MQ Queue Manager to use Keep Alive - how is it done ?
 
 |  On Windows, MQExplorer or amqmdain command.
 _________________
 Peter Potkay
 Keep Calm and MQ On
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | sebastia | 
			  
				|  Posted: Thu Nov 13, 2008 2:49 pm    Post subject: |   |  | 
		
		  |  Grand Master
 
 
 Joined: 07 Oct 2004Posts: 1003
 
 
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | JosephGramig | 
			  
				|  Posted: Fri Nov 14, 2008 5:18 am    Post subject: |   |  | 
		
		  |  Grand Master
 
 
 Joined: 09 Feb 2006Posts: 1244
 Location: Gold Coast of Florida, USA
 
 | 
			  
				| 
   
	| Quote: |  
	| Many thanks, mr P.P. |    
 
  As the coffee spews from my mouth... |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | PeterPotkay | 
			  
				|  Posted: Fri Nov 14, 2008 5:33 am    Post subject: |   |  | 
		
		  |  Poobah
 
 
 Joined: 15 May 2001Posts: 7723
 
 
 | 
			  
				|   The last time that was a problem was in the 2nd grade when we were studying cursive penmanship. The lesson for the day was to repeat your first initial and last initial over and over. "Peter Potkay and Sherri Somethingorother, you two will have extra practice with your one letter! P P and S S, P P and S S, P P and S S, thats right."
 The class roared.
  _________________
 Peter Potkay
 Keep Calm and MQ On
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | sebastia | 
			  
				|  Posted: Fri Nov 14, 2008 9:45 am    Post subject: |   |  | 
		
		  |  Grand Master
 
 
 Joined: 07 Oct 2004Posts: 1003
 
 
 | 
			  
				| I am sorry (again) I can't follow the language joke or special meaning. 
 (1) "spew = if something spews liquid or gas or liquid or gas spews from something, it flows out in large amounts" ... ok
 
 (2) "The class roared" - roar = to make a long, loud, deep sound
 
 >>>  http://dictionary.cambridge.org/
 
 But if it is something related to "pi+pi",
 have to say I didn't mean it, mr Pokay.
 
 I bet you understand. Sebastian.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | PeterPotkay | 
			  
				|  Posted: Fri Nov 14, 2008 10:02 am    Post subject: |   |  | 
		
		  |  Poobah
 
 
 Joined: 15 May 2001Posts: 7723
 
 
 | 
			  
				| When a lot of people laugh very loudly all at once the saying goes they "roared". Although I don't think a bunch of 6 year old children could be classified as "roaring", no matter how funny they thought it was. 
 No offense taken.
  _________________
 Peter Potkay
 Keep Calm and MQ On
 
 Last edited by PeterPotkay on Fri Nov 14, 2008 10:04 am; edited 1 time in total
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | bruce2359 | 
			  
				|  Posted: Fri Nov 14, 2008 10:04 am    Post subject: |   |  | 
		
		  |  Poobah
 
 
 Joined: 05 Jan 2008Posts: 9486
 Location: US: west coast, almost. Otherwise, enroute.
 
 | 
			  
				| Humor is language-specific or dialect-specific.  It is sometimes grade-level specific.  There are also 'inside jokes' - like the fish thing. 
 In IT, sometimes we have to invent funny things to keep us sane, or to appear so to others.
 _________________
 I like deadlines. I like to wave as they pass by.
 ב''ה
 Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
 
 Last edited by bruce2359 on Fri Nov 14, 2008 10:06 am; edited 1 time in total
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  |  |