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 » User Exits » Exit wrongly openning new connetions, not freeing resources

Post new topic  Reply to topic
 Exit wrongly openning new connetions, not freeing resources « View previous topic :: View next topic » 
Author Message
HenriqueS
PostPosted: Fri Aug 01, 2008 9:15 am    Post subject: Exit wrongly openning new connetions, not freeing resources Reply with quote

Master

Joined: 22 Sep 2006
Posts: 235

Folks,

My exit code does not work well. The ALREADY_CONNECTED condition NEVER gets after my MQCONN.

So looks for me that every time a message flows in/out my channel (exit enabled), a new connection is created.

So the number of opened connectios skyrockets and puts MQ down its knees, not allowing any more connections (MQ Explorer connections, JMS connectiosn, etc.).

Any idea why is this happening?

Code:


Conn_options.Options = MQCNO_HANDLE_SHARE_BLOCK;
MQCONNX(pChannelDef->QMgrName, &Conn_options, &Hconn, &CompCode, &Reason);

if(Reason == MQRC_ALREADY_CONNECTED){
         wlog("ALREADY CONNECTED!");
}

MQPUT1(Hconn, &Hobj, &md, &P_options, *pDataLength, pMQXQH, &CompCode, &Reason);
//I know, MQPUT1 spends extra resources, I did this temporarialy just to minimize the chances of not issuing later a MQCLOSE() in my code

//MQDISC(...) - Not used, documentation says to avoid it...


_________________
HenriqueS
Certified Websphere MQ 6.0 System Administrator
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri Aug 01, 2008 9:20 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9400
Location: US: west coast, almost. Otherwise, enroute.

In which exit does this code run?
_________________
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.
Back to top
View user's profile Send private message
HenriqueS
PostPosted: Fri Aug 01, 2008 10:08 am    Post subject: Reply with quote

Master

Joined: 22 Sep 2006
Posts: 235

It´s a channel exit, both receiver and sender. We had a similar exit running on z/OS (mainframe) that did not give this problem.

bruce2359 wrote:
In which exit does this code run?

_________________
HenriqueS
Certified Websphere MQ 6.0 System Administrator
Back to top
View user's profile Send private message
David.Partridge
PostPosted: Mon Aug 04, 2008 12:52 am    Post subject: Reply with quote

Master

Joined: 28 Jun 2001
Posts: 249

Don't use MQCONNX with the MQCNO_HANDLE_SHARE_BLOCK option.

Just do a regular MQCONN (not CONNX). That should result in you getting back a connection handle and MQRC_ALREADY_CONNECTED.
_________________
Cheers,
David C. Partridge
Back to top
View user's profile Send private message
HenriqueS
PostPosted: Mon Aug 11, 2008 9:13 am    Post subject: Reply with quote

Master

Joined: 22 Sep 2006
Posts: 235

I discovered the problem. It was not my exit fault. Actually somebody else was running a program against the queue manager and not closing those same files after getting from them.
_________________
HenriqueS
Certified Websphere MQ 6.0 System Administrator
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » User Exits » Exit wrongly openning new connetions, not freeing resources
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.