Re: [Cppcms-users] How to reconnect to MySQL
Brought to you by:
artyom-beilis
From: 陈抒 <csf...@gm...> - 2011-12-22 00:44:16
|
Thanks. 陈抒 Best regards http://blog.csdn.net/sheismylife On Thu, Dec 22, 2011 at 6:49 AM, Artyom Beilis <art...@ya...> wrote: > Fixed in trunk of cppdb. Now if exception is thrown during use of a > connection > the connection is not recycled. > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.sf.net/ > CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ > > ------------------------------ > *From:* 陈抒 <csf...@gm...> > *To:* cpp...@li... > *Sent:* Monday, December 5, 2011 6:03 PM > *Subject:* [Cppcms-users] How to reconnect to MySQL > > Hello, > My web site's DB connection broke because of timeout. My web site is > developed in China,but MySQL server is running in the USA. I got one error > log: > 2011-12-05 15:43:02 GMT; cppcms, error: Caught exception > [cppdb::mysql::Lost connection to MySQL server during query] > (http_context.cpp:150) > > I have used reconnect property already: > stringstream stream; > > stream<<"mysql:host="<<config.mysql_ip<<";database="<<config.mysql_db_name<<";user="<<config.mysql_user<<";password="<<config.mysql_password<<";@pool_size=20;set_charset_name=utf8; > opt_reconnect=1"; > > But it didn't work. How should I do? Catch exception and call > cppdb::connections_manager::gc() ? > > > 陈抒 > Best regards > http://blog.csdn.net/sheismylife > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure > contains a definitive record of customers, application performance, > security threats, fraudulent activity, and more. Splunk takes this > data and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-novd2d > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > ------------------------------------------------------------------------------ > Write once. Port to many. > Get the SDK and tools to simplify cross-platform app development. Create > new or port existing apps to sell to consumers worldwide. Explore the > Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join > http://p.sf.net/sfu/intel-appdev > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > |