Author |
Message
|
Coz |
Posted: Fri Apr 26, 2002 3:18 am Post subject: |
|
|
 Apprentice
Joined: 20 Feb 2002 Posts: 44 Location: Basel CH
|
I have written a couple of programs which use the same Qmgr 'handle in C thinking' for accessing Queues. In one of my methods i open a new queue fro browsing.
At the end of the method I do a myQueue.close(). This does not actually seem to close the Queue however and using runmqsc it can be seen that the process is still holding the Q open for INPUT.
Any ideas if this is a 'feature' that means for each Q access where they will be opened and closed independently of each other, you have to use a new MQQueueManager?
|
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Apr 26, 2002 5:26 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Be aware that sometimes it takes a little while between the time the queue is closed and the time that the IPROCS count goes down. It is not immediate. At a minimum it takes about 10 seconds and sometimes much longer.
_________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
Coz |
Posted: Fri Apr 26, 2002 12:15 pm Post subject: |
|
|
 Apprentice
Joined: 20 Feb 2002 Posts: 44 Location: Basel CH
|
Ta Pete, but this is no time-out issue. The 'process' remains as there until the program is stopped and restarted, secs, mins, hours, days take your pick. Causing a real bitching problem on some Queues that should be Exclusive Access but have to be shared because of it. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Apr 26, 2002 1:02 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
OK real obvious questions, but you never know...
1.) Does the CLOSE call return 0 for a completion code?
2.) You are closing the correct queue, as in you are passing the correct queue handle to the close call?
3.) You don't have some monitoring tool looking into these queues at the same time for browsing, and that open handle is showing up?
4.) You are 100% sure you are doing the CLOSE call every time, i.e. the CLOSE call is not down some conditional path which may not be executed sometimes?
_________________
Peter Potkay
MQSeries Certified Specialist,Developer
[ This Message was edited by: PeterPotkay on 2002-04-26 14:03 ] |
|
Back to top |
|
 |
deneb |
Posted: Fri Apr 26, 2002 4:37 pm Post subject: |
|
|
 Novice
Joined: 15 Apr 2002 Posts: 18
|
Hi Peter dude
How did u estimate the closing time of the Connection to be 10 sec. is it specific 10 seconds or just an estimated value from your experience.
This is purely for informational purpose, such information is useful for designing purposes
thnx
deneb |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Apr 26, 2002 6:11 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Because I have the same problem you do sometimes! I >>>know<<<< I closed the queue, yet the IPROCS count doesn't immediatly drop. And it varies from queue to queue, queue manager to queue manager, day to day. I posted the question to the list server (How long does it take for IPROCS to go down after a close? And is this documented anywhere?) and a guy from IBM Hursley (the people that wrote MQ) , Andrew Hickson, said on average it should always take only about 10 seconds.
Oh well. All I know is I ended my client trigger monitor an hour ago, and the IPROCS count on the INIT JUST went down to zero. Yet if my app opens and closes another queue on the same queue manager, the IPROCS drops in about 10 seconds. And I see client trigger monitors release the iprocs in about 10 seconds other days.
For what its worth, Version 5.3 will allow us to see which apps have IPROCS and OPROCS into a queue. This won't help me to much in this case, cause I know which guy HAD it open, I wanna know why the QM still thinks the trig monitor has it open an hour later.
_________________
Peter Potkay
MQSeries Certified Specialist,Developer
[ This Message was edited by: PeterPotkay on 2002-04-26 19:13 ] |
|
Back to top |
|
 |
Coz |
Posted: Sun Apr 28, 2002 10:37 pm Post subject: |
|
|
 Apprentice
Joined: 20 Feb 2002 Posts: 44 Location: Basel CH
|
Hi Pete as to your 4 questions. 1 I am not sure but no exceptions are being thrown so assume yes, 2 - 3 def Ok,as the myq.close()is in the method that browses the queue and I have debug statements before and after and I assume the Java classes take care of the handles etc.
|
|
Back to top |
|
 |
PeterPotkay |
Posted: Wed May 01, 2002 6:36 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Coz,
Did you ever figure this out?
_________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
Coz |
Posted: Fri May 03, 2002 12:15 am Post subject: |
|
|
 Apprentice
Joined: 20 Feb 2002 Posts: 44 Location: Basel CH
|
Soz. Yes. Me being a numpty. I wasn't closing the queue when an exception was being thrown like in the totally valid case of the queue being empty! |
|
Back to top |
|
 |
|