Author |
Message
|
Everest |
Posted: Fri Jun 22, 2007 12:21 pm Post subject: Unpredictable triggering problem |
|
|
Novice
Joined: 02 Feb 2007 Posts: 16
|
Invironments: SunSolaris, MQ 5.3
Trigger set up: Triggering queue 'MY.QL' configurered to run script 'myscript.sh' as application. This script forwards the message from MY.QL to another log queue. Trigger type set up - 'FIRST.
Problem: Unpredictably, some messages (at random) are not forwarded to log queue at random interval. Tried changing to trigger type 'EVERY', - the behaviour not changed. Messages are XML, with same format.
Trigger monitor is up and running fine.
process:
---------------
define process(MYPROCESS) APPLTYPE(UNIX) APPLICID('myscript.sh') REPLACE
Triggering Queue:
=============
DEFINE QLOCAL(MY.QL) TRIGGER TRIGTYPE(FIRST) TRIGDPTH(1) PROCESS(MYPROCESS) INITQ(MYINITQ) DEFPSIST(YES) MAXDEPTH(5000) REPLACE
MYNITQ is defined as :
define qlocal(MYINITQ) DEFPSIST(YES) MAXDEPTH(5000) REPLACE
Please note that, the triggering works in general, but fails at random and message starts accumulating in MY.QL.
Any suggestion?? |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Jun 22, 2007 12:52 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Find out what it is about the particular messages that cause your app to stop processing messages, leaving the tm waiting for the app to finish and the queue to pile up... _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Everest |
Posted: Fri Jun 22, 2007 5:42 pm Post subject: |
|
|
Novice
Joined: 02 Feb 2007 Posts: 16
|
jefflowrey wrote: |
Find out what it is about the particular messages that cause your app to stop processing messages, leaving the tm waiting for the app to finish and the queue to pile up... |
All the xml messages have same schema, and size is far less than the max. mssge size for the queue. Still clueless. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Jun 22, 2007 8:19 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Well.
It's almost certainly something about the messages that are causing the application to fail.
I don't know what, because I don't know the application or the data. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Jun 23, 2007 5:16 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
If you have multiple triggers and your triggers are not set for background processing it could well be that some unrelated triggered application is hanging and therefore you do never get to process the trigger for the app where you see the messages piling up...
Put the trigger monitor in the foreground and see where it stops working...
That is the message/process that is hanging it all up...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Everest |
Posted: Sun Jun 24, 2007 5:47 pm Post subject: |
|
|
Novice
Joined: 02 Feb 2007 Posts: 16
|
fjb_saper wrote: |
If you have multiple triggers and your triggers are not set for background processing it could well be that some unrelated triggered application is hanging and therefore you do never get to process the trigger for the app where you see the messages piling up...
Put the trigger monitor in the foreground and see where it stops working...
That is the message/process that is hanging it all up...
Enjoy  |
Yeah, I have three triggers, of same type (i.e. each of three triggering queues have their own corresponding script files as application). But, all the three triggers are sharing/using the same INITQ. Does that make problem? Also I noticed - there are TWO instances of same trigger monitor ( 'runmqtrm' process) running as process... |
|
Back to top |
|
 |
PeterPotkay |
Posted: Tue Jun 26, 2007 10:30 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
One trigger monitor watching one INIT queue that services many application queues works just fine.
Triggering is not broken. Your app is probably encountering a problem, hanging, and leaving the app queue open for input. Triggering is working as designed and not retriggering because one or more of the triggering conditions are not met, a big one being the app queue must not be open for input. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
Everest |
Posted: Wed Jun 27, 2007 11:56 am Post subject: |
|
|
Novice
Joined: 02 Feb 2007 Posts: 16
|
PeterPotkay wrote: |
Triggering is not broken. Your app is probably encountering a problem, hanging, and leaving the app queue open for input. Triggering is working as designed and not retriggering because one or more of the triggering conditions are not met, a big one being the app queue must not be open for input. |
The app queue is not open for input..
If I mannually run the script file (which is set as application), it works as intended.. there does not seem anything wrong with script .. Still in dark
 |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jun 27, 2007 12:26 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Everest wrote: |
The app queue is not open for input..
|
It'll be one of the other conditions then.... _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jun 27, 2007 12:28 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Does ps show that a copy of "myscript.sh" is running? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Wed Jun 27, 2007 4:11 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
or things are working fine for days, then one time your app gets triggered but dies before it has a chance to even open the queue. Now there ar emore than 0 messages on the queue. You won't get retriggered until another message is put AFTER TriggerInterval* seconds goes by.
*Trigger Interval is set at the QM level.
Another way to manually get around this scenario (and one that proves this is the case) is to turn triggering off and on for that one queue to kick start it.
But if this is what is happening:
Fix the app's reason for dying before it opens the queue when triggered.
Set Trigger Interval on the QM to something other than the default of 999999999. We use 60000. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
Everest |
Posted: Thu Jun 28, 2007 8:17 am Post subject: |
|
|
Novice
Joined: 02 Feb 2007 Posts: 16
|
jefflowrey wrote: |
Does ps show that a copy of "myscript.sh" is running? |
I could not get you, 'myscript.sh' is invoked only when message arrives at queue and trigger is fired. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jun 28, 2007 8:34 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Everest wrote: |
jefflowrey wrote: |
Does ps show that a copy of "myscript.sh" is running? |
I could not get you, 'myscript.sh' is invoked only when message arrives at queue and trigger is fired. |
Yes. And if it then locks up and stays running, then the trigger monitor will not go back to looking for initiation messages - because you didn' t start myscript.sh in the background.
And messages will pile up on the initq and on the input queue - which are your symptoms, yes? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Everest |
Posted: Thu Jun 28, 2007 12:13 pm Post subject: |
|
|
Novice
Joined: 02 Feb 2007 Posts: 16
|
jefflowrey wrote: |
....And if it then locks up and stays running, then the trigger monitor will not go back to looking for initiation messages - because you didn' t start myscript.sh in the background. |
>> display process(MYPROCESS)
AMQ8407: Display Process details.
DESCR( )
APPLICID('myscript.sh')
USERDATA( ) ENVRDATA(&)
PROCESS(MYPROCESS) ALTDATE(2007-06-2
ALTTIME(12.52.56) APPLTYPE(UNIX)
===
and 'myscript.sh' body contains
q -m QM1 -I QM1/MY.QL -o QM1/MY.LOG.QL &
'q' here is a utility for forwarding message. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jun 28, 2007 12:20 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Everest wrote: |
ENVRDATA(&) |
Wasn't there in your first post...
So likely the app is crashing, and leaving a message on the queue, so qdepth>0. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|