SPUG: monitoring a Cold Fusion application for health

ced at carios2.ca.boeing.com ced at carios2.ca.boeing.com
Thu Nov 14 19:23:52 CST 2002

Hi Vince,

If the CF 111 error results in some variant of HTTP "server error" 
when there's a fetch, could you just schedule a simple LWP (or even 
cook up a lynx) test ala: 

my $ua = LWP::UserAgent->new;
my $request = HTTP::Request->new(GET => 'http://cf.../foo.htm/');
my $response = $ua->request($request);
unless ( $response->is_success ) { 
   ... do the CF reboot..

You could possibily HEAD instead of GET here if you're just
checking for stupidity. Or even poke into the type of reponse 
error to make sure that the error wasn't something transient.

Charles DeRykus

> I have a Cold Fusion web server running on top of Apache (and postgres) that
> sometimes gets 'stupid' when it starts, the processes appear running, but
> attempts to get files from the web server return a '111 connection refused'
> message from Cold Fusion and no user web accesses are successful. The fix is
> to simply stop/start Cold Fusion (ugh).
> What I'd like to do is write a quickie monitoring routine to run that would
> get a known file, verify that it was received fully, and to do the
> stop/start of the cold fusion processes if it determines CF is brain-dead.
> Any thoughts on what's the easiest way to approach this one ?  This is on
> RedHat-7.2 with the latest RedHat-supplied perl 5.6.1 installed.  Also, I'd
> 'really' like to not have to add any perl modules to vanilla RedHat if at
> all possible, as that causes other adventures when we upgrade perl etc.
> I'm leaning pretty strongly toward a perl solution, but tcl/expect/python
> etc. aren't out of the question if there's something that leaps to mind.
> Any input's much appreciated.... 

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org

More information about the spug-list mailing list