[vox-tech] Crontab oddity - server timeout?

Jan W jcwynholds at yahoo.com
Sat Mar 28 11:12:56 PDT 2009


Hi Bill:

In your script, you have:

STATUS=`wget --save-headers http://www.MYSITE.com/ -O - 2> /dev/null | head -1 | cut -d " " -f 2`

If wget hangs on some part of the transmission, a bunch of your script instances could pile up depending on which timeouts apply (somewhere between fastcgi, lighttpd, wget but I don't know exactly).

In your wget call could you add the --read-timeout option set to some fraction of your two minute poll period?  The read timeout will timeout if the transmission goes idle for the specified amount of time (in any part of the transmission).  wget will then hopefully exit with some status that you grab in your script.  Hopefully this would stop the many instances from piling up, if waiting for a timeout is the culprit.

Speaking generally I thought monitoring software are used usually for the specific applications (RoR, etc), but good ones should be able to be configured to monitor anything.

I've put together a few based on the timer module in python (sockets, smtp, and alot more is available in the base install), others using bash and cron, and used other free and non free monitoring software.  The problem with some are that they have many dependencies, might load the system down, can be tough to pick up and run with or worse do all of the above.  Which is why I prefer few line scripts to do exactly what I need them to.  But then again I'm a scruffy unix guy with a beard.  

HTH

jan 

<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
"The most potent weapon in the hands of the oppressor is the 
mind of the oppressed."
-- Steven Biko
("White Racism and Black Consciousness", in I Write What I Like)
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>


--- On Sat, 3/28/09, Bill Kendrick <nbs at sonic.net> wrote:

> From: Bill Kendrick <nbs at sonic.net>
> Subject: Re: [vox-tech] Crontab oddity - server timeout?
> To: "lugod's technical discussion forum" <vox-tech at lists.lugod.org>
> Date: Saturday, March 28, 2009, 8:36 AM
> On Sat, Mar 28, 2009 at 12:39:18AM -0700, Brian Lavender
> wrote:
> > Did you figure it out?
> 
> Not exactly, but mostly because the server hasn't been
> freaking out
> as much. ;)
> 
> -bill!
> _______________________________________________
> vox-tech mailing list
> vox-tech at lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech


      


More information about the vox-tech mailing list