>>>>> "Thomas" == Thomas P Meyer <tpmeyer@stripped> writes:
Thomas> I was using postgres on linux for the backend of web applications, and
Thomas> pleased except for speed, so I switched to mySQL. The performance
Thomas> did indeed increase dramatically, BUT now the connectivity just a little
Thomas> about 3 per 1000 hits on the database DON'T connect, and my application
Thomas> ends up with a server error.
Thomas> I'm using RogueWave as my C++/DB layer, and the error is in the initial
Thomas> database connection, and doesn't get trapped by try() catch():
Thomas> RWDBDatabase DBConnect(const RWCString& Name)
Thomas> RWDBManager::setErrorHandler (genericRWDBHandler);
Thomas> RWDBDatabase dbase = RWDBManager::database(
Thomas> "ODBC", // RW access library name
Thomas> "mysql", // server name
Thomas> "user", // user name
Thomas> "secret", // password
Thomas> Name); // database name
Thomas> return dbase;
Thomas> catch(RWxmsg x)
Thomas> ProgError("Can't Connect");
Thomas> I never experienced this with postgres, so I'm reluctant to blame
Thomas> 1) Anyone else experince this?
Thomas> 2) Any idea how I can fix this?
Thomas> 3) Any idea how I can dig deeper (mySQL log files, etc...) to get to
Thomas> the root of
Thomas> the problem.
Thomas> I've tried all the obvious, like restarting the database, rebooting,
Thomas> reinstalling, etc....
What error do get you from MySQL when you can't connect ?
Do you have any errors in the MySQL log or error file?
Try increasing the following variables when starting safe_mysqld:
safe_mysqld -O connect_timeout=60 -O max_connections=200
you could also try adding: ulimit -n 1024 to safe_mysqld
You can also get the above error if you are running Linux, but haven't
patched the kernel to allow many file descriptors. For a busy site,
you should increase the file descriptors / process to at 1024 or 2048!