List:MySQL++« Previous MessageNext Message »
From:Julien Chavanton Date:September 18 2006 8:13pm
Subject:RE: Connection sharing vs lost of query per connections
View as plain text  
Ok after all the performance look's great I think my problem was
mysql_ping() after reading the description again I found that we must
use this only when there was a significant idle period and not every
query like I was doing.

I guess the normal behaviour is to wait after an error and then
reconnect if possible?

Julien



-----Original Message-----
From: Julien Chavanton 
Sent: September 18, 2006 3:31 PM
To: plusplus@stripped
Subject: Connection sharing vs lost of query per connections

I have a design concern with MySql++, I have multithreaded software that
can have 1000 threads simultaneously connecting to a Mysql server

 

At first I made one connection per thread but it quickly becomes a
performance problem, the system was taking to long to connect.

 

Then I switched to one connection for each server/database shared
amongst the threads.

 

Now I receive `MySQL server has gone away ` reading the online doc I now
read a contradictory advice to use many connections, anyone as a
scalable solution to share?

*	You can also encounter this error with applications that fork
child processes, all of which try to use the same connection to the
MySQL server. This can be avoided by using a separate connection for
each child process. 

 

 

 

 

Thread
Connection sharing vs lost of query per connectionsJulien Chavanton18 Sep
RE: Connection sharing vs lost of query per connectionsJulien Chavanton18 Sep
  • Re: Connection sharing vs lost of query per connectionsWarren Young19 Sep
RE: Connection sharing vs lost of query per connectionsJulien Chavanton20 Sep
  • Re: Connection sharing vs lost of query per connectionsWarren Young21 Sep
RE: Connection sharing vs lost of query per connectionsJulien Chavanton20 Sep
RE: Connection sharing vs lost of query per connectionsJulien Chavanton20 Sep
  • RE: Connection sharing vs lost of query per connectionsMatt Dargavel21 Sep