[Israel.pm] MySQL server has gone away?

ik idokan at gmail.com
Thu Nov 9 02:29:29 PST 2006


Hi,

The problem usually happens when you do not close your database
connection, and after x amount of time, there are too many open
connections to the database that was not closed.
The last line when you are at position where the DB will no longer be
used, you should write the following:

$dbh->disconnect();

Please note that for queries that you use you should tell the database
that you have finished with the query records as following:

$sth->finish();

>Hello, can anybody tell me why this Mysql error
>happens in some times and not all of the times:
>
>DBD::mysql::db selectrow_array failed: MySQL server
>has gone away at filename.pm line 62.
>
>regards,
>Rami Dakka.
>

Ido
-- 
http://ik.homelinux.org/



More information about the Perl mailing list