Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Server Gone away

220 views
Skip to first unread message

Mike Blezien

unread,
Apr 16, 2003, 4:17:53 PM4/16/03
to DBI List
hello all,

we've been getting this error "MySQL server has gone away...." with some of our
Perl scripts... using DBI to access the database... and can't seem to pin-point
the problem. Is this a script problem and/or error or is this the MySQL server
it's self ??

the tricky part is it doesn't happen all the time !

TIA

--
Mike<mickalo>Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Web Hosting
http://www.justlightening.net
Tel: 1(985)902-8484
MSN: mic...@bellsouth.net
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Rudy Lippan

unread,
Apr 16, 2003, 5:09:16 PM4/16/03
to Mike Blezien, DBI List
On Wed, 16 Apr 2003, Mike Blezien wrote:

> hello all,
>
> we've been getting this error "MySQL server has gone away...." with some of our
> Perl scripts... using DBI to access the database... and can't seem to pin-point
> the problem. Is this a script problem and/or error or is this the MySQL server
> it's self ??
>
> the tricky part is it doesn't happen all the time !
>

This happens when mysqld restarts or the connection to mysql times out.

IIRC, Later version of mysql will automatically try and reconenct to the
db and some version of DBD::mysql try to reconnect.

What version of mysql & DBD::mysql are you using?


-r

Mike Blezien

unread,
Apr 16, 2003, 5:23:23 PM4/16/03
to Rudy Lippan, DBI List
This is on a client's server, so I don't have any control over what's all
installed, but currently they have the following:

* DBI: - 1.14
* DBD::mysql: - 2.0415
* MySQL Version: - 3.23.52

I realize the DBI module is quiet out-dated, but it's been working for quiet
some time without any problems :)

--

R Brett Wormley

unread,
Apr 16, 2003, 5:47:02 PM4/16/03
to Rudy Lippan, Mike Blezien, DBI List
This can also happen, as I have just discovered, when a row query or
result is too large. From the MYSQL Reference Manual:

"You can also get these errors if you send a query to the server that
is incorrect or too large. If mysqld gets a packet that is too large
or out of order, it assumes that something has gone wrong with the
client and closes the connection. If you need big queries (for
example, if you are working with big BLOB columns), you can increase
the query limit by starting mysqld with the -O max_allowed_packet=#
option (default 1M). The extra memory is allocated on demand, so
mysqld will use more memory only when you issue a big query or when
mysqld must return a big result row!"

--
Brett

0 new messages