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 » IBM MQ Java / JMS » MQ Connections not closing

Post new topic  Reply to topic
 MQ Connections not closing « View previous topic :: View next topic » 
Author Message
nakuser
PostPosted: Wed Oct 15, 2003 4:41 am    Post subject: MQ Connections not closing Reply with quote

Newbie

Joined: 24 Sep 2003
Posts: 5

We are connecting to MQ using an in-house written classes which encapsulates all the JMS code from everyone. This code has been audited externally by IBM.

We have a problem where we are connecting through MQ clients. At times the connections are not being dropped. This is problem because we have to bug the MQ administrator because we run out of connections.
_________________
SCJP
Back to top
View user's profile Send private message
mqonnet
PostPosted: Wed Oct 15, 2003 4:55 am    Post subject: Reply with quote

Grand Master

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

Similar issue is being dealt in the following thread.

http://www.mqseries.net/phpBB2/viewtopic.php?t=11209&highlight=

As an aside you could always increase the maxchannels and maxactivechannels for the qmgr in question.

Also make sure your client app does call MQDISC so that everything ends cleanly enough.

Cheers
Kumar
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bower5932
PostPosted: Wed Oct 15, 2003 5:41 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

You didn't mention any code levels. Make sure that you are running with one of the later code levels (5.2 CSD4 or greater). There were problems with connections being hung onto that were solved.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
nakuser
PostPosted: Wed Oct 15, 2003 5:59 am    Post subject: Reply with quote

Newbie

Joined: 24 Sep 2003
Posts: 5

When you mean code levels I assume you mean JMS version. I will have a look at that.


Can the queue manager close connections that have been opened for a while and not in use?
_________________
SCJP
Back to top
View user's profile Send private message
mrlinux
PostPosted: Wed Oct 15, 2003 6:19 am    Post subject: Reply with quote

Grand Master

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

He means MQSeries version and CSD
_________________
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
nakuser
PostPosted: Thu Oct 16, 2003 1:53 am    Post subject: Reply with quote

Newbie

Joined: 24 Sep 2003
Posts: 5

We are running MQ 5.3 CSD5.

I think what happens is that if the application dies with out a commit being done, the connections that were close are not committed back to MQ.

I don't know if this makes sense.
_________________
SCJP
Back to top
View user's profile Send private message
bower5932
PostPosted: Thu Oct 16, 2003 5:34 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

I would have said close rather than commit, and you may have hit on the actual problem. You need to explicitly close the connections or resources will get hung onto. You can get around this with some of the channel parameters (HBINT, KAINT). You might want to look into them.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
nakuser
PostPosted: Thu Oct 16, 2003 11:37 pm    Post subject: Reply with quote

Newbie

Joined: 24 Sep 2003
Posts: 5

This is the logic in the code we all use .
try {

// get connection
// connection start
// get session
// get queue
// get sender
// create message
//send message
} catch (JMSException jmsEx) {
throw new MessengerException(
"MessageConsumer->JMS Error code: "
+ jmsEx.getErrorCode()
+ "\n"
+ jmsEx.getMessage());
} catch (ServiceNotFoundException snfX) {
throw new MessengerException(
"MessageConsumer->JMS Error code: " + "\n" + snfX.getMessage());
} finally {
//close sender.
// close session.
//close connection
}
return messageId;
}



The connections are closed some of the time. The commiting or rolling back of the transaction is outside of this class or around it. It depends on whether it was started in a transaction scope or not.

So we are testing some code locally thus going to other serves using MQ client.

I would love to know why the code say "close" but the connections are still dangling. This is a real problem.
_________________
SCJP
Back to top
View user's profile Send private message
bower5932
PostPosted: Fri Oct 17, 2003 4:51 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

You mentioned that the connections are closed some of the time. Do you mean that you sometimes close them or that they are always closed and sometime MQ closes them? You also mentioned that they are hanging around. What does netstat show as the status for the connections?
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » MQ Connections not closing
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.