I’m investigating Debian bug report
concerning the complete failure of startup of Apache when webmux.pl
is being PerlRequire’d and the database server is unavailable.
I’ve been able to reproduce this myself with both MySQL and PostgreSQL.
In this particular instance, the reason the database server is not
running is because the user is using parallel bootup script, but the
same would apply if, for example, the database server was on a separate
system from the web server. However it’s worth noting that parallel
booting will be the default for the next version of Debian so it’s going
to become a common problem.
From a look at the code in webmux.pl (3.8.8) I don’t see a simple
solution to this problem; the database connection is established by
RT::Init which is needed before launching into the Mason handler.
The parts of the Init call which use the database appear to be:
- InitPlugins(); (possibly plugins talk to the database in init…)
The explicit use of the database handle is to call CheckCompatibility.
This looks like a “nice to have” function rather than an essential -
it is after all also called by rt-setup-database.
Maybe it would be possible to split the Init into two stages and only
do the database connection in the second stage, which could be
run by the Mason handler the first time a request comes in.
I couldn’t find an open bug about this, which is a bit surprising
because it seems relatively likely to happen in all sort of scenarios.
Do people agree that this is a problem that should be fixed? Any obvious
(minimally-invasive, given that this is something that should be fixed
in a frozen Debian release) methods?
Dominic Hargreaves, Systems Development and Support Team
Computing Services, University of Oxford
signature.asc (189 Bytes)