Re: Runnaway Trigger

This WebDNA talk-list message is from

2007


It keeps the original formatting.
numero = 68674
interpreted = N
texte = Interesting philosophy Donovan, I think I will rewrite all my triggers that way! As for what I'm actually doing... This particular trigger is, I think, one of my more creative and useful ones. It solves a problem that SMI was incapable of solving to my satisfaction. I have 5 WebDNA servers. I got tired of having the WebCatEngines turning themselves off for no reason, and then not realizing they were off for half a day. So I created triggers on every server. Every hour, on the half hour, each server runs a serverstatcheck.tpl that [TCPConnect]s to it's neighbor. The neighbor simply responds with "good" or it does not respond at all. If it does not respond, then the server doing the check sends me a text message to my cell phone. I am then able to log in through my cell phone web browser and check error logs, restart WebCatalog or reboot the server. So in worse case, none of my servers will be out of commission for more than 59 minutes. What I find really strange is that most of my WebCat failures happen between 1AM and 5AM. I'll also note that since this neighbor checking system has been running (December 2006) I've only had to restart WebCat on 3 of the servers. Since 1998 I've only had a few issues with triggers. I find them to be rather stable on RedHat Linux. All of the other issues I had were actually because of run time errors and my own bad coding. But seeing the strange NextExecute time, I realize this is something different. I'm wondering if perhaps there was a Timeout issue, and then the Retry kicked in. But I don't know how to track down what might be causing the Timeout/Retry. Matthew Perosi Psi Prime, Inc. New Jersey Donovan Brooke wrote: > Jesse Proudman wrote: > >> From my experience, the easiest solution is to throw the trigger >> away and switch to using wget or curl in a crontab. >> >> -- > > > From my experience, the most stable solution is to use infallible code. > Often enough, triggers are used in ways that cause problems or > are used in ways that are not as stable as other methods. Matthew is > describing one of these that, depending on his needs, I may suggest > he change his philosophy a bit. However, first, I wanted to check his > settings because they can be a PIA to troubleshoot if they are set > wrong. I still make errors when setting triggers. > > > Regarding the use of triggers, I'll speak in general terms because I > don't really > know what Matthew is testing for and what his test code is. However, > I see many people use triggers as a way of executing code in a certain > time frame. It is my experience that, instead of giving the job of > "time keeper" to the trigger system, you give that job to the code > instead. > for example, ...Instead of hitting a page every hour, hit the page > quite a > few times per hour and have the code on that page decipher if its time > to execute. > This also protects against misc. hits. > > Donovan > > > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Runnaway Trigger ( Marko Bernyk 2007)
  2. Re: Runnaway Trigger ( Matthew A Perosi 2007)
  3. Re: Runnaway Trigger ( Stuart Tremain 2007)
  4. Re: Runnaway Trigger ( Matthew A Perosi 2007)
  5. Re: Runnaway Trigger ( Jesse Proudman 2007)
  6. Re: Runnaway Trigger ( Donovan Brooke 2007)
  7. Re: Runnaway Trigger ( Jesse Proudman 2007)
  8. Re: Runnaway Trigger ( Donovan Brooke 2007)
  9. Runnaway Trigger ( Matthew A Perosi 2007)
Interesting philosophy Donovan, I think I will rewrite all my triggers that way! As for what I'm actually doing... This particular trigger is, I think, one of my more creative and useful ones. It solves a problem that SMI was incapable of solving to my satisfaction. I have 5 WebDNA servers. I got tired of having the WebCatEngines turning themselves off for no reason, and then not realizing they were off for half a day. So I created triggers on every server. Every hour, on the half hour, each server runs a serverstatcheck.tpl that [tcpconnect]s to it's neighbor. The neighbor simply responds with "good" or it does not respond at all. If it does not respond, then the server doing the check sends me a text message to my cell phone. I am then able to log in through my cell phone web browser and check error logs, restart WebCatalog or reboot the server. So in worse case, none of my servers will be out of commission for more than 59 minutes. What I find really strange is that most of my WebCat failures happen between 1AM and 5AM. I'll also note that since this neighbor checking system has been running (December 2006) I've only had to restart WebCat on 3 of the servers. Since 1998 I've only had a few issues with triggers. I find them to be rather stable on RedHat Linux. All of the other issues I had were actually because of run time errors and my own bad coding. But seeing the strange NextExecute time, I realize this is something different. I'm wondering if perhaps there was a Timeout issue, and then the Retry kicked in. But I don't know how to track down what might be causing the Timeout/Retry. Matthew Perosi Psi Prime, Inc. New Jersey Donovan Brooke wrote: > Jesse Proudman wrote: > >> From my experience, the easiest solution is to throw the trigger >> away and switch to using wget or curl in a crontab. >> >> -- > > > From my experience, the most stable solution is to use infallible code. > Often enough, triggers are used in ways that cause problems or > are used in ways that are not as stable as other methods. Matthew is > describing one of these that, depending on his needs, I may suggest > he change his philosophy a bit. However, first, I wanted to check his > settings because they can be a PIA to troubleshoot if they are set > wrong. I still make errors when setting triggers. > > > Regarding the use of triggers, I'll speak in general terms because I > don't really > know what Matthew is testing for and what his test code is. However, > I see many people use triggers as a way of executing code in a certain > time frame. It is my experience that, instead of giving the job of > "time keeper" to the trigger system, you give that job to the code > instead. > for example, ...Instead of hitting a page every hour, hit the page > quite a > few times per hour and have the code on that page decipher if its time > to execute. > This also protects against misc. hits. > > Donovan > > > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Matthew A Perosi

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

WebMerchant when CC network is down - bug? (1998) error: Too many nested [xxx] contexts (1997) Replace Statement (1997) Domain name & WebDNA 5.0 (2003) Re[2]: 2nd WebCatalog2 Feature Request (1996) displaying New products (using [date]) (1997) Format question WC Mac f3 (1997) Clear/Reset form with JavaScript (2001) formulas.db ?? (1998) Eims vs WebDNA (2003) Mime Headers for Mail (1998) Help with nested search (1998) Database Upload (2000) unable to launch acgi in WebCat (1997) Uploading stuff along with variables (2006) Web Delivery Page concept (1997) 2.0 Info (1997) Nested vs conditional (1997) form data submission gets truncated (1997) bug in [SendMail] (1997)