[Catalyst] Catalyst I18N::DBI prevent connect at startup

Stefan maillist at s.profanter.me
Thu Jun 6 18:40:04 GMT 2013



I'm using Catalyst with the Catalyst::Plugin::I18N::DBI module.


The catalyst page is served through apache2 with mod_perl.


When starting apache2, the I18N module tries to connect immediately to the
MySQL server.


Here comes the problem:

At boot, apache2 tries to start before MySQL. Since MySQL is not yet
running, the I18N module fails with the following error (of course because
no MySQL):

DBI connect('database:localhost:3306','User',...) failed: Can't connect to
local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at
/usr/local/share/perl/5.10.1/Catalyst/Plugin/I18N/DBI.pm line 196.


This prevents apache2 to start correctly thus I have to start it always
manually after each boot which works fine because now mysql is running.


Is there a possibility to prevent this early connection or force a lazy




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20130606/31d193f8/attachment.htm

More information about the Catalyst mailing list