Re: [CDBI] Lost connection to MySQL server during query

[prev] [thread] [next] [Date index for 2006/01/20]

From: John Beppu
Subject: Re: [CDBI] Lost connection to MySQL server during query
Date: 19:11 on 20 Jan 2006
Here's one that hit me very recently.

http://dev.mysql.com/doc/refman/5.0/en/gone-away.html#c7112



On 20/01/06, Carlos Vicente <cvicente@xxxxxxxxxxxxxxxx.xxxxxxx.xxx> wrote:
> Hi all,
>
> I've been having this kind of error recently and can't seem to find a
> solution:
>
> error:          DBD::mysql::st execute failed: Lost connection to MySQL s=
erver
> during query [for Statement "SELECT address, prefix, status, used_by
> FROM Ipblock
> WHERE id=3D?
> "] at /usr/lib/perl5/site_perl/5.8.0/DBIx/ContextualFetch.pm line 51.
> context:
> ...
> 47:     sub _untaint_execute {
> 48:     my $sth =3D shift;
> 49:     my $old_value =3D $sth->{Taint};
> 50:     $sth->{Taint} =3D 0;
> 51:     my $ret =3D $sth->SUPER::execute(@_);
> 52:     $sth->{Taint} =3D $old_value;
> 53:     return $ret;
> 54:     }
> 55:
> ...
> code stack:     /usr/lib/perl5/site_perl/5.8.0/DBIx/ContextualFetch.pm:51
> /usr/lib/perl5/site_perl/5.8.0/DBIx/ContextualFetch.pm:31
> /usr/lib/perl5/site_perl/5.8.0/DBIx/ContextualFetch.pm:86
> /usr/lib/perl5/site_perl/5.8.0/Class/DBI.pm:849
> /usr/lib/perl5/site_perl/5.8.0/Class/DBI.pm:836
> /usr/lib/perl5/site_perl/5.8.0/Class/Accessor.pm:385
> /usr/local/netdot/lib/Netdot/IPManager.pm:416
> /usr/local/netdot/lib/Netdot/IPManager.pm:748
> /usr/local/netdot/lib/Netdot/DeviceManager.pm:828
> /usr/local/netdot/htdocs/updatedevice.html:164
> /usr/local/netdot/htdocs/section_management.html:174
> /usr/local/netdot/htdocs/autohandler:20
> raw error
>
> As you can probably guess, this is a web app using Class::DBI, HTML::Maso=
n and mod_perl.
>
> The problem happens at random and it's difficult to reproduce.  It happen=
s at differnt parts of the code.
> In some cases, to simplify things, I bypass Class::DBI and execute direct=
 SQL queries using the db handle returned by db_Main.
> I don't know whether this has anything to do with the issue.
> I've followed the suggestions in the wiki about the interaction between A=
pache::DBI and Ima::DBI and added an overridden
> db_Main in my Class::DBI subclass.  But that didn't seem get rid of the e=
rror.  :-(
>
> The versions of packages I'm running are as follows:
>
> Class::DBI v3.0.14
> Ima::DBI 0.34
> DBI 1.50
> DBD::mysql 3.0002
> Apache 2.0.53
> Apache::DBI 0.9901
> Ima::DBI 0.34
> HTML::Mason 1.32
> mod_perl-2.0.1
> MySQL 4.1.14-standard
>
>
> Any help would be very appreciated.

_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

[CDBI] Lost connection to MySQL server during query
Carlos Vicente 18:06 on 20 Jan 2006

Re: [CDBI] Lost connection to MySQL server during query
John Beppu 19:11 on 20 Jan 2006

Generated at 12:49 on 27 Jan 2006 by mariachi v0.52