While testing Bug 13645 patch #2, I noticed that DBIx calls apparently do interfere with DBD::mysql mysql_auto_reconnect attribute. We have mysql auto reconnect enabled since Bug 10611, and it works fine as long as there are no DBIx calls being made - but if there is such a call in the given code, this attribute gets reseted to 0 as a side affect, disabling auto reconnect feature for all further DBI or DBIx calls being made from the same process and/or thread. E.g.: use Modern::Perl; use C4::Context; use Koha::Acquisition::Bookseller; my $dbh = C4::Context->dbh; print "Auto reconnect: ".$dbh->{mysql_auto_reconnect}."\n"; my @booksellers = Koha::Acquisition::Bookseller->search(); print "Auto reconnect: ".$dbh->{mysql_auto_reconnect}."\n"; ## $dbh->{mysql_auto_reconnect}=1; sleep(15); ## mysqld to be reloaded in the meanwhile @booksellers = Koha::Acquisition::Bookseller->search(); Auto reconnect: 1 Auto reconnect: 0 DBD::mysql::st execute failed: MySQL server has gone away at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1593. At first I assumed that it may be caused by 'Bug 13645: Use DBIx::Connector', but nope, it turns out that this issue is also present in unpatched master. Probably not such a big problem for the plain CGI setups in most typical circumstances, but lack of working auto reconnect may be quite a nuisance under plack/mod_perl.
Surely linked to Bug 14374 and Bug 14375
*** This bug has been marked as a duplicate of bug 14778 ***
Created attachment 51737 [details] [review] Bug 13669: followup to add DBIx::RunSQL dependency Just that To test: 1) run koha_perl_deps and check it show up The module DBIx::RunSQL appears now on the 'About' page Signed-off-by: Marc Véron <veron@veron.ch>
Comment on attachment 51737 [details] [review] Bug 13669: followup to add DBIx::RunSQL dependency I mistaked with the bug number, sorry for the noise.