ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » Closing MQ connections properly

Post new topic  Reply to topic Goto page 1, 2  Next
 Closing MQ connections properly « View previous topic :: View next topic » 
Author Message
thecamel
PostPosted: Wed May 08, 2002 4:15 am    Post subject: Reply with quote

Newbie

Joined: 07 May 2002
Posts: 8
Location: UK

Help!

I have a problem whereby MQ processes are building up on my box without being closed. I have a .disconnect() method in the finally {} statement whereever MQ in called.

Any help much appreciated!!
Back to top
View user's profile Send private message MSN Messenger
PeterPotkay
PostPosted: Wed May 08, 2002 4:31 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7716

2 things:
Before the disconnect, you should specifically close each queue when you are done using it. Do not rely on the disconnect to cleanly close objects.

Make sure you always do the close/disconnect. i.e. if you get an error, make sure the path you get thrown down closes/disconnects.


_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
thecamel
PostPosted: Wed May 08, 2002 4:37 am    Post subject: Reply with quote

Newbie

Joined: 07 May 2002
Posts: 8
Location: UK

Okay,

Yes. I always close the queue first.
Yes. The queue close() and MQManager close() is always done in the finally statement.

As this runs on UNIX, is there any way the local MQ Manager itself could have been configured incorrectly?? We have had this problem since it was restarted.
Back to top
View user's profile Send private message MSN Messenger
thecamel
PostPosted: Fri May 10, 2002 12:42 am    Post subject: Reply with quote

Newbie

Joined: 07 May 2002
Posts: 8
Location: UK

This is still a problem for me. Can anyone help???
Back to top
View user's profile Send private message MSN Messenger
mqonnet
PostPosted: Fri May 10, 2002 3:41 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

Also would be useful to check the return codes from MQCLOSE and MQDISC calls. Not quite sure if you are handling the errors for these calls. And as suggested by Peter, check to see if the path followed is appropriate down under after the close call.

Cheers.
Kumar

_________________
IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website
PeterPotkay
PostPosted: Fri May 10, 2002 4:32 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7716

Are these MQ proccesses you refer to Client connections?

_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
thecamel
PostPosted: Fri May 10, 2002 6:38 am    Post subject: Reply with quote

Newbie

Joined: 07 May 2002
Posts: 8
Location: UK

Yes, they are client connections.
Back to top
View user's profile Send private message MSN Messenger
PeterPotkay
PostPosted: Fri May 10, 2002 7:34 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7716

What is the heartbeat interval on the SVRCONN channel? What might be happening is that the client apps end abnormally, before they have a chance to close the queue. The queue manager does not realize this and thus the channel (connection) stays up. If you have a heartbeat flowing, say every 30 seconds back and forth, then the first heartbeat after the client app goes away will let the QM side know that the other side is gone.

_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
thecamel
PostPosted: Mon May 13, 2002 1:09 am    Post subject: Reply with quote

Newbie

Joined: 07 May 2002
Posts: 8
Location: UK

The heartbeat interval is currently set to 300 secs (the default).
Back to top
View user's profile Send private message MSN Messenger
PeterPotkay
PostPosted: Mon May 13, 2002 8:22 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7716

Well, I'm outta ideas.

Do these proccesses build up and never go away (i.e. the # just keeps rising)? Or do they eventually go away?


Does restarting the QM get rid of them?
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
GregJ
PostPosted: Mon May 13, 2002 9:04 am    Post subject: Reply with quote

Acolyte

Joined: 24 Oct 2001
Posts: 69
Location: Markham, On. Canada

I recently had of a problem very similar to this - the svrconn channels kept piling up even though the DISC and CLOSE calls were made.

The problem was due to IIS on the client machine holding the connections. Installing the latest (5.0) patch seemed to help, but the problem is still there.

I have a script to restart the listener every night - that takes care of that.
Back to top
View user's profile Send private message
bduncan
PostPosted: Mon May 13, 2002 10:06 am    Post subject: Reply with quote

Padawan

Joined: 11 Apr 2001
Posts: 1554
Location: Silicon Valley

Did you try comparing the queue handles to MQHO_UNUSABLE_HOBJ after you issued the MQCLOSE? This will tell you without a doubt whether the close succeeded. There is an equivalent constant for disconnects, but I can't remember the name off the top of my head...
_________________
Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator
Back to top
View user's profile Send private message Visit poster's website AIM Address
thecamel
PostPosted: Tue May 14, 2002 12:01 am    Post subject: Reply with quote

Newbie

Joined: 07 May 2002
Posts: 8
Location: UK

Would changing the kernel parameters on the unix box which is hosting the local queue manager cause amqcrsta connections to pile up?
Back to top
View user's profile Send private message MSN Messenger
mrlinux
PostPosted: Tue May 14, 2002 3:32 am    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

No it would not, it sounds more like application issue with connections.
Have there been recent application changes ????
_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries
Back to top
View user's profile Send private message Send e-mail
thecamel
PostPosted: Tue May 14, 2002 4:05 am    Post subject: Reply with quote

Newbie

Joined: 07 May 2002
Posts: 8
Location: UK

Yes, but I can't see where the change would have caused this to occur. I guess I will just have to keep looking. Trial and error and all that...
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » General IBM MQ Support » Closing MQ connections properly
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.