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 API Support » error 2017; disconnect() seems to be a problem

Post new topic  Reply to topic
 error 2017; disconnect() seems to be a problem « View previous topic :: View next topic » 
Author Message
anilm
PostPosted: Thu Jul 31, 2003 5:57 am    Post subject: error 2017; disconnect() seems to be a problem Reply with quote

Newbie

Joined: 20 Mar 2003
Posts: 7

HI,

In our application, we are continuously trying to open-read-close a
queue manager connection. We are using MQSeries ver 5.2 and programming with C++.

Sometimes, we are doing this as much as 500 times. So the maximum open handles is surpassed if we retain the default value of 256. The
application works as long as the Max Open Handles value is not surpassed. Then the error 2017, MQRC_HANDLE_NOT_AVAILABLE, is thrown.

In our code, we say qMgr.disconnect(), where qMgr is an ImqQueueManager object. This returns a true. Also, when we use IsConnected() to check if it has really disconnected, it returns true.

My understanding is that disconnect() should close the queue manager
connection and close all open handles. If this is correct, why would the
above behaviour occur? Would it matter that we are doing this
continuoulsy, with hardly any gap between close and open? Does MQ take some time to release resources?

Please advise on how to avoid this. We would rather have the app close connections than increasing the Max handle count.

Thanks
Anil.
Back to top
View user's profile Send private message
mqonnet
PostPosted: Thu Jul 31, 2003 6:21 am    Post subject: Re: error 2017; disconnect() seems to be a problem Reply with quote

Grand Master

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

[b]"
In our code, we say qMgr.disconnect(), where qMgr is an ImqQueueManager object. This returns a true. Also, when we use IsConnected() to check if it has really disconnected, it returns true.
"[/b]

If IsConnected returns "true", which means that the disconnect did not happen. Now the question that arises is why you are getting 2017. Remember that you would get this only when you exceed "OPEN" handles and not connections. Hence it must be either number of mqopens without mqclose or number of queues opened for put say in a dist list.

What i would do is, to check if the close succeded. Because if it did not and neither did your disconnect, then you always have an opener to this queue.

Cheers
Kumar
Back to top
View user's profile Send private message Send e-mail Visit poster's website
anilm
PostPosted: Thu Jul 31, 2003 6:49 pm    Post subject: Reply with quote

Newbie

Joined: 20 Mar 2003
Posts: 7

Sorry, I meant to write IsConnected() returns false.
What I do is first disconnect(), then check bool value of IsConnected(). This returns a false, so I assume that disconnect happens.

And we do not have a distribution queue. It's a simple open q, send request, get reresponse and then close. This is done continuously for an end of day transaction.

Thanks in advance
Anil.
Back to top
View user's profile Send private message
mqonnet
PostPosted: Fri Aug 01, 2003 4:35 am    Post subject: Reply with quote

Grand Master

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

See my previous update as to why you could end up getting a 2017.

Just out of curiosity, why are you doing conns and discs for each put/get??? You know they are expensive. And incidenlty you can code in your program to handle most of the real-time situations without doing this. If it is just one queue and the same queue in question, which is what it looks like, then should'nt have to do open and close either, each time.

Post your code or explain in detail as to what you are attempting.

And as i mentioned in my earlier post, 2017 has nothing to do with conns and discs, its number of openers/puts. Take a look at the messages manual for detailed explaination of this reason code.

Cheers
Kumar
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » error 2017; disconnect() seems to be a problem
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.