|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Exit wrongly openning new connetions, not freeing resources |
« View previous topic :: View next topic » |
Author |
Message
|
HenriqueS |
Posted: Fri Aug 01, 2008 9:15 am Post subject: Exit wrongly openning new connetions, not freeing resources |
|
|
 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 |
|
 |
bruce2359 |
Posted: Fri Aug 01, 2008 9:20 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 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 |
|
 |
HenriqueS |
Posted: Fri Aug 01, 2008 10:08 am Post subject: |
|
|
 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 |
|
 |
David.Partridge |
Posted: Mon Aug 04, 2008 12:52 am Post subject: |
|
|
 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 |
|
 |
HenriqueS |
Posted: Mon Aug 11, 2008 9:13 am Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|