إنضمامك إلي منتديات استراحات زايد يحقق لك معرفة كل ماهو جديد في عالم الانترنت ...

انضم الينا
استراحات زايد الصفحة الرئيسية


 
 
LinkBack أدوات الموضوع انواع عرض الموضوع
  #1  
قديم 02-09-2010, 11:10 PM
عضو ماسي
بيانات محروم.كوم
 رقم العضوية : 503
 تاريخ التسجيل : Dec 2007
الجنس : female
علم الدوله :
 المشاركات : 2,100,669
عدد الـنقاط :3341
 تقييم المستوى : 2140

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 @ 0603 PM
Error Date : Tuesday, February 9th 2010 @ 0603 PM
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__
رد مع اقتباس
 

مواقع النشر (المفضلة)


تعليمات المشاركة
لا تستطيع إضافة مواضيع جديدة
لا تستطيع الرد على المواضيع
لا تستطيع إرفاق ملفات
لا تستطيع تعديل مشاركاتك

BB code is متاحة
كود [IMG] متاحة
كود HTML معطلة
Trackbacks are متاحة
Pingbacks are متاحة
Refbacks are متاحة



الساعة الآن 04:16 PM


Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.5.2 TranZ By Almuhajir

RSS RSS 2.0 XML MAP HTML