Re: [AOLSERVER] scheduled proc stops
What you should see in the error logs is a line from the scheduler indicating that something took too long. But anything that doesn't retun instantly should use a thread, why risk it? Another way to do this particular thing might be to start up a thread every few minutes and loop/sleep for 20-30 times then exit. tom jackson On Thursday 06 December 2007 01:32, Fenton, Brian wrote: Hi Ian, Yes it does, so you should put in its own thread anything that takes more than a reasonable length of time to run. From what I could see last time I looked at this, not only does it hold up the scheduler but future procs all seem to get knocked off schedule. It drove me crazy for a few days a while back. Brian -Original Message- From: AOLserver Discussion [mailto:[EMAIL PROTECTED] On Behalf Of Ian Harding Sent: 05 December 2007 21:31 To: AOLSERVER@LISTSERV.AOL.COM Subject: Re: [AOLSERVER] scheduled proc stops I wonder if this is trying to tell me something... [05/Dec/2007:13:27:47][11035.3086878944][-main-] Warning: callbacks: timeout waiting for shutdown procs I see this after shutdown... well, before the actual final shutdown message. It is something to do with that first minute. If I have a scheduled proc that is NOT run in its own thread, does it tie up the whole scheduler until it finishes? I guess it would... I think that's what's happening. Thanks, - Ian On Dec 4, 2007 1:26 PM, Tom Jackson [EMAIL PROTECTED] wrote: Do you have all your scheduled procs run in threads? Here are some ideas: 1. any proc which doesn't return immediately needs to be run in a thread. 2. at startup there could still be something which runs once and lasts too long to allow this proc to run. Maybe something starts up right before the first minute and lasts too long? 3. one way to test this would be to somehow delay the first run to sometime past a minute. I seem to remember that the rescheduling (when you don't use -once) happens after your thread finishes. If the scheduler is delayed too long, it skips this short interval proc and then it never runs again. There is usually a message which gets printed saying a scheduled proc took too long. Probably this message means you could have missed another scheduled proc? tom jackson On Tuesday 04 December 2007 11:22, Ian Harding wrote: at 7 seconds it stops after 8 runs. at 10 seconds it stops after 6 runs. I am starting to see a trend. ;^) I swear it used to run all day at 5 seconds and I have not changed anything in the server config. Odd. -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank. -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank. -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank. -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank.
Re: [AOLSERVER] scheduled proc stops
Hmmm, 12 * 5 = 60 so you run this 12 times a minute, maybe the scheduler gets screwed up by this? Try running it ever 7 seconds and see what happens. tom jackson On Tuesday 04 December 2007 09:43, Ian Harding wrote: I have a scheduled proc that runs 12 times and then just stops. No explanation in any logs. I don't know what I changed, because it used to work... ns_schedule_proc -thread 5 cleancache ip proc cleancache {which} { ns_log Notice cleancache $which called if {[nsv_array exists ${which}cache]} { ns_log Debug Clearing ${which}cache... nsv_unset ${which}cache } } Any ideas? I am running 4.5 on Linux. The proc shows up in nstelemetry with a next run time in the past when this happens. - Ian -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank. -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank.
Re: [AOLSERVER] scheduled proc stops
Hi Ian, Yes it does, so you should put in its own thread anything that takes more than a reasonable length of time to run. From what I could see last time I looked at this, not only does it hold up the scheduler but future procs all seem to get knocked off schedule. It drove me crazy for a few days a while back. Brian -Original Message- From: AOLserver Discussion [mailto:[EMAIL PROTECTED] On Behalf Of Ian Harding Sent: 05 December 2007 21:31 To: AOLSERVER@LISTSERV.AOL.COM Subject: Re: [AOLSERVER] scheduled proc stops I wonder if this is trying to tell me something... [05/Dec/2007:13:27:47][11035.3086878944][-main-] Warning: callbacks: timeout waiting for shutdown procs I see this after shutdown... well, before the actual final shutdown message. It is something to do with that first minute. If I have a scheduled proc that is NOT run in its own thread, does it tie up the whole scheduler until it finishes? I guess it would... I think that's what's happening. Thanks, - Ian On Dec 4, 2007 1:26 PM, Tom Jackson [EMAIL PROTECTED] wrote: Do you have all your scheduled procs run in threads? Here are some ideas: 1. any proc which doesn't return immediately needs to be run in a thread. 2. at startup there could still be something which runs once and lasts too long to allow this proc to run. Maybe something starts up right before the first minute and lasts too long? 3. one way to test this would be to somehow delay the first run to sometime past a minute. I seem to remember that the rescheduling (when you don't use -once) happens after your thread finishes. If the scheduler is delayed too long, it skips this short interval proc and then it never runs again. There is usually a message which gets printed saying a scheduled proc took too long. Probably this message means you could have missed another scheduled proc? tom jackson On Tuesday 04 December 2007 11:22, Ian Harding wrote: at 7 seconds it stops after 8 runs. at 10 seconds it stops after 6 runs. I am starting to see a trend. ;^) I swear it used to run all day at 5 seconds and I have not changed anything in the server config. Odd. -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank. -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank. -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank.
Re: [AOLSERVER] scheduled proc stops
I wonder if this is trying to tell me something... [05/Dec/2007:13:27:47][11035.3086878944][-main-] Warning: callbacks: timeout waiting for shutdown procs I see this after shutdown... well, before the actual final shutdown message. It is something to do with that first minute. If I have a scheduled proc that is NOT run in its own thread, does it tie up the whole scheduler until it finishes? I guess it would... I think that's what's happening. Thanks, - Ian On Dec 4, 2007 1:26 PM, Tom Jackson [EMAIL PROTECTED] wrote: Do you have all your scheduled procs run in threads? Here are some ideas: 1. any proc which doesn't return immediately needs to be run in a thread. 2. at startup there could still be something which runs once and lasts too long to allow this proc to run. Maybe something starts up right before the first minute and lasts too long? 3. one way to test this would be to somehow delay the first run to sometime past a minute. I seem to remember that the rescheduling (when you don't use -once) happens after your thread finishes. If the scheduler is delayed too long, it skips this short interval proc and then it never runs again. There is usually a message which gets printed saying a scheduled proc took too long. Probably this message means you could have missed another scheduled proc? tom jackson On Tuesday 04 December 2007 11:22, Ian Harding wrote: at 7 seconds it stops after 8 runs. at 10 seconds it stops after 6 runs. I am starting to see a trend. ;^) I swear it used to run all day at 5 seconds and I have not changed anything in the server config. Odd. -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank. -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank.
Re: [AOLSERVER] scheduled proc stops
at 7 seconds it stops after 8 runs. at 10 seconds it stops after 6 runs. I am starting to see a trend. ;^) I swear it used to run all day at 5 seconds and I have not changed anything in the server config. Odd. - Ian On Dec 4, 2007 10:16 AM, Tom Jackson [EMAIL PROTECTED] wrote: Hmmm, 12 * 5 = 60 so you run this 12 times a minute, maybe the scheduler gets screwed up by this? Try running it ever 7 seconds and see what happens. tom jackson On Tuesday 04 December 2007 09:43, Ian Harding wrote: I have a scheduled proc that runs 12 times and then just stops. No explanation in any logs. I don't know what I changed, because it used to work... ns_schedule_proc -thread 5 cleancache ip proc cleancache {which} { ns_log Notice cleancache $which called if {[nsv_array exists ${which}cache]} { ns_log Debug Clearing ${which}cache... nsv_unset ${which}cache } } Any ideas? I am running 4.5 on Linux. The proc shows up in nstelemetry with a next run time in the past when this happens. - Ian -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank. -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank. -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank.
Re: [AOLSERVER] scheduled proc stops
Do you have all your scheduled procs run in threads? Here are some ideas: 1. any proc which doesn't return immediately needs to be run in a thread. 2. at startup there could still be something which runs once and lasts too long to allow this proc to run. Maybe something starts up right before the first minute and lasts too long? 3. one way to test this would be to somehow delay the first run to sometime past a minute. I seem to remember that the rescheduling (when you don't use -once) happens after your thread finishes. If the scheduler is delayed too long, it skips this short interval proc and then it never runs again. There is usually a message which gets printed saying a scheduled proc took too long. Probably this message means you could have missed another scheduled proc? tom jackson On Tuesday 04 December 2007 11:22, Ian Harding wrote: at 7 seconds it stops after 8 runs. at 10 seconds it stops after 6 runs. I am starting to see a trend. ;^) I swear it used to run all day at 5 seconds and I have not changed anything in the server config. Odd. -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: field of your email blank.