Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

RE: Lost connection to MySQL server during query: msg#00062

db.mysql.c++

Subject: RE: Lost connection to MySQL server during query

Thanks Bill,

I am using MySql++ 2.1.1 and MySql 5.1.9. Do you know whether this is a
mysql++ or mysql problem?

Mine is definitly also no timeout issue. Thanks for your workaround, but we
should figure out what the root cause of this is.

Roger

-----Original Message-----
From: Bill K [mailto:reply@xxxxxxxxxxx]
Sent: Wednesday, January 17, 2007 10:25 AM
To: Urscheler, Roger (COM Chantry CA)
Cc: MySQL++ Mailing List
Subject: Re: Lost connection to MySQL server during query

Hello Roger,

I also have this problem, in a mult-threaded environment as you described. I
searched for a solution all over and went through all the possibilities
found on the mysql web site and others. It is definitely not a timeout, as
is said to be the most common reason for this exception. I found no
solution.

The work-around that I did was code the app to call ping() on the connection
object after that exception was thrown and then put the query back in the
query queue I have setup, which is then promptly processed just fine. I even
use the 'reconnect' and 'multi_statement' (needed anyway for stored
procedures) options. ping() will test and reconnect the connection.

Not a fix by any means but at least it gets the job done, and just ever so
slightly slower, as like you said, it happens every 50 or 100 queries or so.

Note: Using MySql 5.20 and the release of MySql++ 2.1.1. If I remember
correctly, this problem started happening when I started using stored
procedures.

- Bill K.


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.
>
> Does anybody know about this problem?
>
> Thanks,
> Roger
>
>
>

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe:
http://lists.mysql.com/plusplus?unsub=gcdmc-plusplus@xxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
ide.eclipse.wtp...    bug-tracking.ro...    xfree86.cvs/200...    lisp.wxcl.devel...    file-systems.ar...    kde.devel.kwrit...    jakarta.jetspee...    qnx.openqnx.dev...    drivers.openib/...    ports.xbox.deve...    gis.gdal.devel/...    netbsd.ports.ma...    ubuntu.marketin...    systemtap/2005-...    web.omniweb/200...    mail.qmail.ldap...    hardware.soekri...    os.netbsd.devel...    audio.madman.ge...    tv.freeguide-tv...    cluster.openmos...    education.ezpro...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation