[Rt-devel] webmux connecting to the database; causing mod_perl startup to fail

Dominic Hargreaves dominic.hargreaves at oucs.ox.ac.uk
Sat Sep 11 09:45:51 EDT 2010


Hello,

I'm investigating Debian bug report
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=595054>
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:

- InitSystemObjects()
- 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?

Cheers,
Dominic.

-- 
Dominic Hargreaves, Systems Development and Support Team
Computing Services, University of Oxford
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.bestpractical.com/pipermail/rt-devel/attachments/20100911/12b8490b/attachment.pgp>


More information about the rt-devel mailing list