John ORourke wrote:
> Colin Wetherbee wrote:
>> John ORourke wrote:
>>> Colin Wetherbee wrote:
>>> Wouldn't a simpler approach be to just restart Apache when you want
>>> to update the lists? You could even have the 'add to list' function
>>> send SIGUSR1 to the parent Apache, causing a graceful restart.

>> I'm trying to avoid restarting Apache altogether, although I admit it
>> would be a pretty simple solution.

> I'd seriously consider it - it's simple and clean and only takes a few
> seconds, and it happens every night when you rotate your logs anyway.
> If you really really don't want to restart Apache, you could get your
> 'add data' function to create a file called 'need_restart' somewhere on
> the disk, and after processing each request your mod_erl handler could
> check for the file and call $r->child_terminate if it finds it. You'd
> have to have some method of stopping it from constantly restarting....
> could get complicated.

I thought about the file thing... if the file exists, check its last
modified timestamp; if that timestamp is greater than the stored
timestamp, then update the data from the database. It seems like
unnecessary disk access, though. Then again, this whole problem is
riddled with unnecessary disk access.

> The cynic in me suspects you'll spend too many hours on this
> not-really-a-problem, when there may be other parts of the system that
> would benefit from more attention!

Well, you're probably right about that.

Perhaps I'll set up a restart-based system and then worry about it later
if it becomes an "actual" problem.

Thanks for your input.