I'm relatively new to mod_perl... I've got a 700k file that is loaded each
time I run a CGI script, so I'm hoping to cache the file using mod_perl
somehow. The file will change occasionally (maybe once a week) - the reload
of a few seconds isn't worrisome, but it has to be done without
::Simple. XML::Simple can
cache that file into memory. Is this how I should do it? Or should I load
the file from my startup.pl script so that the file is shared amongst all
the apache children? If that's the case, how would I dynamically reload it?
Morbus Iff
.sig on other machine.
http
The above code asigns a signal handler for the USR2 signal.
This signal has been chosen because it's least likely to be
used by the other parts of the server.
That, unfortunately doesn't tell me what causes a USR2 signal to be sent to
Apache. Or when it's caused. I only want to
.
Morbus Iff
.sig on other machine.
http://www.disobey.com/
http://www.gamegrene.com/
I hope ya understand.
Well, I hope we've all got that off our chests.
I'm really hoping so - I *hate* this sort of stuff.
Now, have you got enough to get you going OK?
I'm thinking I do, yes. Thanks for asking.
Morbus Iff
.sig on other machine.
http://www.disobey.com/
http
::Simple. XML::Simple can
cache that file into memory. Is this how I should do it? Or should I load
the file from my startup.pl script so that the file is shared amongst all
the apache children? If that's the case, how would I dynamically reload it?
Morbus Iff
.sig on other machine.
http
At 04:24 PM 5/9/01, Robert Landrum wrote:
At 3:51 PM -0400 5/9/01, Morbus Iff wrote:
** The 700k file is an XML file, read in by XML::Simple. XML::Simple
can cache that file into memory. Is this how I should do it? Or
should I load the file from my startup.pl script so that the file
checking against the file -M time
myself, and then send a USR2 signal myself?
Morbus Iff
.sig on other machine.
http://www.disobey.com/
http://www.gamegrene.com/
reloading the
file into the same variable in my startup.pl wouldn't cause the parent to
share it with new children?
Morbus Iff
.sig on other machine.
http://www.disobey.com/
http://www.gamegrene.com/
Ultimately, I'm looking for something I can do totally from within Perl.
Couldn't you create a Perl script to run as a cron job that could stat
the file off-line for you and HUP the server when it has changed?
That would seem easy enough. You'd just have to work out the perms on
the cron user
10 matches
Mail list logo