List:MySQL++« Previous MessageNext Message »
From:Julien Chavanton Date:September 20 2006 1:56pm
Subject:RE: Daemon passes wait_timeout and gets "MYSQL SERVER HAS GONE AWAY"
View as plain text  
 
 
 
>Think I figured it out. 
 
>m_db_conn = new Connection( db_name, host, username, pw, port);
>if(m_db_conn->connected())
>{
>  m_db_conn->set_option(Connection::Option::opt_reconnect, true);
>}
 
This is interesting however; it seems like this solution uses an
abstraction of Mysql++ API?
Can you provide the equivalent C API function call to Mysql++
 
 
 
 
 
>>We have the same issue so I am also curious what the recommended
approach 
>>is.
>> 
>> 
>>Bruce
>> 
>> 
>>From: "Bryan Seay" <bseay@stripped>>
>>To: <plusplus@stripped>>
>>Subject: Daemon passes wait_timeout and gets "MYSQL SERVER HAS GONE
AWAY"
>>Date: Thu, 7 Sep 2006 10:28:40 -0500
>>I have a daemon running 24/7 that uses the mysql++ package to connect
to my
>>database.  It works great but after it passes the wait_timeout of the 
>>server
>>it, of course, spits out a "MYSQL SERVER HAS GONE AWAY".
>> 
>>My question is what is the correct way to deal with this?  Is there
some
>>option I am not seeing that will make the daemon reconnect to the db
if it
>>fails?  Or should I put a timer in my code that "pings" the database
>>occasionally to keep the connection open?
>> 
>>Any ideas are appreciated.
>> 
>>Thanks,
>>Bryan
>> 
>> 

 


Thread
Daemon passes wait_timeout and gets "MYSQL SERVER HAS GONE AWAY"Bryan Seay7 Sep
RE: Daemon passes wait_timeout and gets "MYSQL SERVER HAS GONE AWAY"Bruce Keats11 Sep
RE: Daemon passes wait_timeout and gets "MYSQL SERVER HAS GONE AWAY"Bryan Seay12 Sep
RE: Daemon passes wait_timeout and gets "MYSQL SERVER HAS GONE AWAY"Julien Chavanton20 Sep
  • RE: Daemon passes wait_timeout and gets "MYSQL SERVER HAS GONE AWAY"Matt Dargavel21 Sep