|
إنضمامك إلي منتديات استراحات زايد يحقق لك معرفة كل ماهو جديد في عالم الانترنت ...
انضم الينا
#1
| ||
| ||
Hello all, I've recently started a forum, we have 250 users, we usually have around 7 people on at any given time, ive recently started to get these errors randomly Please note we are not using any custom scripts or plugins Quote: mysql_connect() [function.mysql-connect]: Too many connections /websites/123reg/LinuxPackage23/un/lu/ck/unlucky-racing.com/public_html/forums/includes/class_core.php on line 311 MySQL Error : Error Number : Request Date : Tuesday, February 9th 2010 @ 06 ![]() Error Date : Tuesday, February 9th 2010 @ 06 ![]() Script : http://www.unlucky-racing.com/forums/ Referrer : http://www.unlucky-racing.com/ IP Address : 90.221.74.141 Username : Classname : vB_Database MySQL Version : The IPs change but its always class_core.php and always line 311 So i took a look at line 311, this is what it is Quote: /** * Initialize database connection(s) * * Connects to the specified master database server, and also to the slave server if it is specified * * @param string Name of the database server - should be either 'localhost' or an IP address * @param integer Port of the database server (usually 3306) * @param string Username to connect to the database server * @param string Password associated with the username for the database server * @param boolean Whether or not to use persistent connections to the database server * @param string Not applicable; config file for MySQLi only * @param string Force connection character set (to prevent collation errors) * * @return boolean */ function db_connect($servername, $port, $username, $password, $usepconnect, $configfile = '', $charset = '') { if (function_exists('catch_db_error')) { set_error_handler('catch_db_error'); } // catch_db_error will handle exiting, no infinite loop here do { $link = $this->functions[$usepconnect ? 'pconnect' : 'connect']("$servername:$port", $username, $password); } while ($link == false AND $this->reporterror); restore_error_handler(); if (!empty($charset)) { if (function_exists('mysql_set_charset')) { mysql_set_charset($charset); } else { $this->sql = "SET NAMES $charset"; $this->execute_query(true, $link); } } return $link; } The actual 311 line is in bold, im asking how many SQL connections my hosting will allow, but is it safe to assume that my server is being overloaded? Its only started as we have increased in traffic + size Im afraid i dont have much PHP or SQL experience so i am at your mercy Thanks in advance, __DEFINE_LIKE_SHARE__ |
مواقع النشر (المفضلة) |
| |