----- Original Message -----
From: "Victoria Reznichenko" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 26, 2002 4:44 PM
Subject: re: Lost connection to MySQL server during query


> Mark,
> Tuesday, November 26, 2002, 7:32:15 AM, you wrote:
>
> M> Yes, again. :( Although reluctantly, I finally decided to upgrade
> M> to 3.23.53a (on FreeBSD 4.7R), in the hope to get rid of these
> M> annoying errors. Alas, 6 out of 10 times when I start a MySQL
> M> application, I get an error like this:
>
> M> DBD::mysql::st execute failed: Lost connection to MySQL server
> M> during query at /usr/libdata/perl/5.00503/News/MySQL/User.pm
> M> line 209.
>
> M> The log is very non-telling; it mostly bales at something entirely
> trivial;
>
> Check that max_allowed_packet is big enough:
>       http://www.mysql.com/doc/en/Gone_away.html


Max_allowed_packet is not in issue here (set at 1M). This query only returns
30 newsgroups or so. Besides, the connection to MySQL does not always get
lost here; sometimes a bit later, sometimes a bit earlier, and sometimes not
at all.

> Do you get the same result if you execute this query from
> command-line?

The problem only occurs after my news server called an external check-table
program, which does an extended check on all tables within its scope. This
only happens when the news server was not shutdown properly.

Before you ask, no, there are no errors in the tables (nor have there, as
far as I know, ever been). And besides, like I said, my program does not
always lose the connection; just 6 out of 10 times after it ran the rather
intense extended table check program.

The two seem related; but I cannot figure out how. It seems as if the huge
activity on the tables prior to my news server doing its regular startup
(after it just called the table-check program), has an effect on the
stability of the new connection I am trying to make. Although, for the life
of me, I cannot figure out how (the table-check program logs into MySQL as a
special "maintenance" user).

When the connection gets losts, I restart the news server a few times; and
once the connection holds, it remains running smoothly. As it should, since
the tables contain no errors.

I even set a ridiculously high connection timeout value in /etc/my.cnf:

set-variable = connect_timeout=15

But that makes no difference.

- Mark


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to