I don't know if this will answer the question:

Is MySQL located on the same computer your script/software is running on..??

If this is not the case you have a chance that your network connection to the computer
which MySQL is running on loses some packets which results in the above problem..

Another option to prevent these mistakes is to always check if a query was
succesfully executed..
If not, retry the query, or send/log an error... I must say that with my experience
of MySQL I can't recall any experience in which I lost a connection other than
that the network connection fell away..

Regards,
David


----- Original Message ----- 
From: "Benjamin Charles Tehan" <[EMAIL PROTECTED]>
To: "mysql" <[EMAIL PROTECTED]>
Sent: Sunday, November 25, 2001 02:23
Subject: MySQL C API - Lost connection?


> I'm using MySQL 3.23.43 running on Linux with a 2.2.16 kernel.
> 
> My software does around 50,000 inserts a day and from some of those inserts
> they result in:
> 
> Lost connection to MySQL server during query
> 
> The software is developed in C, using the mysql C api to talk to the
> database.
> 
> Problem is.. once I get this error I'd assume I have lost connection to the
> database and that I would need to reconnect and try to insert the query
> again.
> 
> For this instance I DO NOT reconnect to the database and the application
> continues to make more queries to the database but they work fine even after
> I get the above result from the queries I had  made before.
> 
> Does the MySQL C API automatically reconnect when a connection is lost?
> If so does it try to execute the query again once it has reconnected to the
> database?
> 
> If it doesn't automatically reconnect then why am I getting this error when
> the application really has not lost connection with the database.
> Considering it can succesfully insert queries after the above result..
> 
> Any help would be appreciated.
> 
> Regards,
> 
>             Benjamin Charles Tehan
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 


---------------------------------------------------------------------
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