I have a php driven site that pulls data from a mySQL dB running on a Win2K server. I currently configure my dB using phpMyAdmin. Most of the time the site is fine but sometimes users get a "Could not connect to dB" error, and the server needs to reboot. I think this might be happening cause there are renegade connections that aren't closing and after some time of users on the site the number of connections grows to where no one can connect. Is there some software I can use to monitor the number of dB connections?
OK, this is the actual error:
Could not connect to database.PHP Warning: mysql_pconnect(): Can't connect to MySQL server on 'localhost'
(10061) in f:\inetpub\wwwroot\noel\lib\adodb\drivers\adodb-mysql.inc.php on line 251
and line 251 is the 4th line in this function:
function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename)
{
if (ADODB_PHPVER >= 0x4300)
$this->_connectionID = mysql_pconnect($argHostname,$argUsername,$argPassword,$this->clientFlags);
else
$this->_connectionID = mysql_pconnect($argHostname,$argUsername,$argPassword);
if ($this->_connectionID === false) return false;
if ($this->autoRollback) $this->RollbackTrans();
if ($argDatabasename) return $this->SelectDB($argDatabasename);
return true;
}
Any advice greatly appreciated 🙂