Moonlight
10-06-1999, 08:45 AM
It has been a while I did not have any problems with MySQL Lost Connection but since a few days, it's so often.
For example, 2 days ago I had a log of cgi errors of 30k only of MySQL Lost Connection, that is in 1 day.
This morning, in the last 20 minutes, it happened to me 8 times.
%% [Wed Oct[nbsp][nbsp]6 08:23:57 1999]
%% [Wed Oct[nbsp][nbsp]6 08:35:43 1999]
%% [Wed Oct[nbsp][nbsp]6 08:35:51 1999]
%% [Wed Oct[nbsp][nbsp]6 08:35:53 1999]
%% [Wed Oct[nbsp][nbsp]6 08:35:54 1999]
%% [Wed Oct[nbsp][nbsp]6 08:35:56 1999]
%% [Wed Oct[nbsp][nbsp]6 08:35:57 1999]
%% [Wed Oct[nbsp][nbsp]6 08:43:26 1999]
In fact, it been more than 20 minutes I could not connect to the MySQL server.
I even tried via TELNET, and when I wrote MySQL I got :
"ERROR 2013: Lost connection to MySQL server during query"
A while back there was a talk about a dedicdated server for MySQL, is there any news?
Can someone give me a routine that would replace the following code with a 'retry' rountine :
sub db_connect{
[nbsp][nbsp]if (!$ENV{'MOD_PERL'}) {
[nbsp][nbsp][nbsp][nbsp]require DBI;
[nbsp][nbsp]}
[nbsp][nbsp]$dbh = DBI -> connect("DBI:$config{'dbdriver'}:$config{'dbname'}:$config{'dbser ver'}", "$config{'dbuser'}", "$config{'dbpass'}")
[nbsp][nbsp]or die "Can't connect to sql server.[nbsp][nbsp]Reason: $DBI::errstr";
[nbsp][nbsp]if (!$ENV{'MOD_PERL'}) {
[nbsp][nbsp][nbsp][nbsp]$dbh->{'Warn'} = 0;
[nbsp][nbsp]}
}And please, don't give me a pseudo-code but a direct coding that I could use.
Thanks...
Moonlight
For example, 2 days ago I had a log of cgi errors of 30k only of MySQL Lost Connection, that is in 1 day.
This morning, in the last 20 minutes, it happened to me 8 times.
%% [Wed Oct[nbsp][nbsp]6 08:23:57 1999]
%% [Wed Oct[nbsp][nbsp]6 08:35:43 1999]
%% [Wed Oct[nbsp][nbsp]6 08:35:51 1999]
%% [Wed Oct[nbsp][nbsp]6 08:35:53 1999]
%% [Wed Oct[nbsp][nbsp]6 08:35:54 1999]
%% [Wed Oct[nbsp][nbsp]6 08:35:56 1999]
%% [Wed Oct[nbsp][nbsp]6 08:35:57 1999]
%% [Wed Oct[nbsp][nbsp]6 08:43:26 1999]
In fact, it been more than 20 minutes I could not connect to the MySQL server.
I even tried via TELNET, and when I wrote MySQL I got :
"ERROR 2013: Lost connection to MySQL server during query"
A while back there was a talk about a dedicdated server for MySQL, is there any news?
Can someone give me a routine that would replace the following code with a 'retry' rountine :
sub db_connect{
[nbsp][nbsp]if (!$ENV{'MOD_PERL'}) {
[nbsp][nbsp][nbsp][nbsp]require DBI;
[nbsp][nbsp]}
[nbsp][nbsp]$dbh = DBI -> connect("DBI:$config{'dbdriver'}:$config{'dbname'}:$config{'dbser ver'}", "$config{'dbuser'}", "$config{'dbpass'}")
[nbsp][nbsp]or die "Can't connect to sql server.[nbsp][nbsp]Reason: $DBI::errstr";
[nbsp][nbsp]if (!$ENV{'MOD_PERL'}) {
[nbsp][nbsp][nbsp][nbsp]$dbh->{'Warn'} = 0;
[nbsp][nbsp]}
}And please, don't give me a pseudo-code but a direct coding that I could use.
Thanks...
Moonlight