List:MySQL++« Previous MessageNext Message »
From:Manuel Jung Date:January 17 2007 6:42pm
Subject:Re: Lost connection to MySQL server during query
View as plain text  
> Urscheler, Roger (COM Chantry CA) wrote:
>> Hi,
>>
>> I have a multi-threaded application with a threadpool where each thread
>> has its own connection (and query and row objects). I did set the
>> 'reconnect' and 'multi statement' options. Once a while (about every 50
>> or 100 queries) the connection to mysql is disconnected, the exception is
>> "Lost connection to MySQL server during query". The 'reconnect' option
>> reconnects automatically again, but still this query failed.
>>

Hi,
I had the same problem some time ago (im using a simalar
multithreding-connection system. My problem was: I had a query which
returned many rows, but didnt used (a failure) all of them. then i tried to
reuse the query and result object i got that error. if u use the same query
(of course in the same thread) many times, do a query.reset() and
res.purge() before reusing them, even if it works most times without them.
this solved my problem.

Greets 
Manuel Jung
Thread
Lost connection to MySQL server during queryCOM Chantry CA)17 Jan
  • Re: Lost connection to MySQL server during queryBill K17 Jan
  • Re: Lost connection to MySQL server during queryManuel Jung17 Jan
  • Re: Lost connection to MySQL server during queryManuel Jung17 Jan
  • Re: Lost connection to MySQL server during queryManuel Jung17 Jan
RE: Lost connection to MySQL server during queryCOM Chantry CA)17 Jan
RE: Lost connection to MySQL server during queryJim Wallace17 Jan
RE: Lost connection to MySQL server during queryCOM Chantry CA)17 Jan
  • Re: Lost connection to MySQL server during queryWarren Young17 Jan