List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:April 10 1999 12:02pm
Subject:Mysql Disconnections
View as plain text  
>>>>> "Vincent" == Vincent Stoessel <vince@stripped> writes:

Vincent> Hello, I've been noticing occasional diconnects from a remote 
Vincent> machine using php3. The client machine would give me an error
Vincent> like :
Vincent> PHP 3 Warning:  MySQL Connection Failed: Lost connection to MySQL server
> during query.
Vincent> It would last for a few seconds and stop, no big deal. But just now started
> getting a lot of
Vincent> disconnects.
Vincent> fortunately I was logged in using the command-line client. I did these 2
> commands, notice 
Vincent> the Delayed_insert_threads:


mysql> show status 
-> ;
Vincent> +--------------------------+------------+
Vincent> | Variable_name            | Value      |
Vincent> +--------------------------+------------+
Vincent> | Aborted_clients          | 1          |
Vincent> | Aborted_connects         | 0          |
Vincent> | Created_tmp_tables       | 0          |
Vincent> | Delayed_insert_threads   | 4294967295 |

<cut>

I just checked the above;  The only reason that I can find when the
above may happens if MySQL gets out of memory when it tries to create
a thread to handle delayed inserts;  In this case the
Delayed_insert_threads count is not incremented (I have now fixed this 
for the next MySQL release)

Are you sure that you are not running out of memory?

Vincent> | Uptime                   | 76161      |
Vincent> +--------------------------+------------+
Vincent> 30 rows in set (0.01 sec)


Vincent> Notice the State and Info columns 
mysql> show processlist ;
Vincent>
> +-------+------+-------------+--------------+---------+------+-------+------------------+
Vincent> | Id    | User | Host        | db           | Command | Time | State | Info   
>          |
Vincent>
> +-------+------+-------------+--------------+---------+------+-------+------------------+
Vincent> | 21993 | www  | localhost   | adserver     | Sleep   | 83   | NULL  | NULL   
>          |
Vincent> | 21996 | www  | localhost   | hitlist      | Sleep   | 122  | NULL  | NULL   
>          |
Vincent> | 21998 | www  | localhost   | adserver     | Sleep   | 10   | NULL  | NULL   
>          |

<cut>
Vincent> 114 rows in set (0.01 sec)

Looks ok.

Vincent> Any ideas on what might be happening?
Vincent> Thanks.

If MySQL doesn't restart (it doesn't look so) and you are using
persintent connections, could the reason be that the connection has
been up too long and that the MySQL server has closed this ?

Do you get any messages in the MySQL error log?

Regards,
Monty
Thread
Mysql DisconnectionsVincent Stoessel7 Apr
  • Mysql DisconnectionsMichael Widenius10 Apr