2ge has asked for the wisdom of the Perl Monks concerning the following question:
Symptomps: the worst thing on this is, sometimes script works OK, as I expect. But sometimes I get:main_script: ============ use strict; use warnings; ... ... use lib '/home/hosting/foo.bar/public_html/libs/perl'; use OpenSubtitles::Help; ... ( $i->{FileName} ) = $dbh->selectrow_array(qq{ select SubFileName from subs_subtitle_file a left join subs_subtitle b on a.SubtitleID = b.IDSubtitle where IDSubtitleFile = ? }, {}, $i->{IDSubtitleFile}); module_script: ============== package OpenSubtitles::Help; use strict; use warnings; use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION); use Exporter; use DBI; $VERSION = 1.00; @ISA = ('Exporter'); @EXPORT = qw( $dbh get_user ); #db connect our $dbh = DBI->connect("DBI:mysql:database=sub;host=localhost;port=33 +06", "foo", "bar", { AutoCommit => 1, RaiseError => 1, }) or die "Can't connect: ", $DBI::errstr; ... 1;
I really dont know whats going here. I checked mysql uptime, it is OK, it is not restarting.1.error: [Fri Mar 3 19:46:19 2006] -e: DBD::mysql::db selectrow_array failed: MySQL server has gone away at ... 2.error: [Fri Mar 03 19:43:11 2006] [error] Global symbol "$dbh" requires expli +cit package name at ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: mysql server has gone away & strange behaviour
by rnahi (Curate) on Mar 04, 2006 at 10:47 UTC | |
|
Re: mysql server has gone away & strange behaviour
by perrin (Chancellor) on Mar 04, 2006 at 15:38 UTC | |
by 2ge (Scribe) on Mar 05, 2006 at 13:29 UTC | |
by perrin (Chancellor) on Mar 06, 2006 at 22:41 UTC |