Kyle R . Burton on Fri, 17 May 2002 16:30:19 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Apache based applications [mod_perl]


> > Due to Apache's multi-process nature, and Perl's purported issues with
> > signal handlers, I'm not sure signals are the best solution.  Nor am I
> > convinced that monitoring the timestamp of the file is a great idea either.
> > Checking the timestamp for every request seems like a waste of resources
> > and on a busy system, also seems like it would be a bad way to handle it.
> 
> I don't know a mod_perl specific solution. But what I've done in the
> past is to have something like this, in pseudo-code:
> 
>     if(last_check_time - time() > threshold) {
>         if(the file is changed) {
>             reload it
>         }
>     }
> 
> If threshold is a minute or a few minutes, you keep the load of
> checking quite low, as the time test is extremely fast and light
> weight. Usually that's enough responsiveness if you can cope with
> maybe being out of sync for the duration of threshold.


So the check shouldn't cost that much?  I suppose at least for a development
environment, if that's turned on it'd be ok.

Thanks for the feedback.

Kyle


-- 

------------------------------------------------------------------------------
Wisdom and Compassion are inseparable.
        -- Christmas Humphreys
mortis@voicenet.com                            http://www.voicenet.com/~mortis
------------------------------------------------------------------------------

______________________________________________________________________
Philadelphia Linux Users Group       -      http://www.phillylinux.org
Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
General Discussion  -  http://lists.phillylinux.org/mail/listinfo/plug