2007-12-01, 11:12 PM
The problem began with many website users getting caught in the host's firewall for sending excessive connections. The following includes the messages sent to me from the host. I have also included the MYBB code for the two scripts in question. I am really desperate for help here. We need to figure how why users are making so many connections. Thank you:
Host has taken my site down, reasons are in their text. PLEASE HELP, this is a very urgent issue, my site is down. Here is the message I received from my host:
Hello Kurt,
I was recently called to your server by a load spike. Upon investigating, I noticed that your account is using a significant amount of resources on the server. Here is a read out of your usages:
kurt kurtsmetana.com 14.57 16.69 0.4
Top Process %CPU 25.0 [php]
Top Process %CPU 24.0 [php]
Top Process %CPU 22.0 /usr/bin/php xmlhttp.php
In case you are unfamiliar with these readouts, here is the general format:
--------------------------------------------------------------
[USERNAME] [DOMAINNAME] [CPU] [MEM] [SQL]
Top Process %CPU [CPU%] [ HIGHEST RESOURCE USING SCRIPT #1]
Top Process %CPU [CPU%] [ HIGHEST RESOURCE USING SCRIPT #2]
Top Process %CPU [CPU%] [ HIGHEST RESOURCE USING SCRIPT #3]
--------------------------------------------------------------
Although the highest usage scripts do not always coincide with the total overall CPU usages, they are often the first place to look when attempting to reduce your resource usage. The exact script causing the high values is not always available in the readouts.
Your account is using 14.57% of all available CPU resources for the entire server. You are also using 16.69% of all memory available for the server. Additionally, you are using 0.4 mysql resources. Typical resource usage for mysql is .1-.2.
Please investigate your account and attempt to reduce your usages. If you have made any signficant changes to any scripts you employ on your account, you may want to consider disabling them to see if your usages drop.
Alternatively, if you'd like to simply upgrade to a plan that offers more CPU/Memory/Mysql resources, you can view our offerings here.
http://ace-host.net/virtualservers.html
http://ace-host.net/dedicatedservers.html
The option to upgrade is not required at this time, but it is not uncommon for popular sites to outgrow a shared hosting environment. At some point in a site's lifetime it is not unreasonable for the site to require more resources than are possible in a shared environment. We do not require an upgrade upon first notice of high resource usages, though contiuous high usages usually indicate the need to upgrade.
Please provide us with an update as to the action taken to reduce your usages. If you have any questions, please let me know.
- Sean Malen
Technician
Hello Kurt,
I have been forced to suspend your account due to continue excessive resource consumption. Below are some more recent resource consumption stats for kurtsmetana.com:
Dec 1:
kurt kurtsmetana.com 27.35 20.74 0.7
Top Process %CPU 36.0 /usr/bin/php index.php
Top Process %CPU 31.0 /usr/bin/php showthread.php
Top Process %CPU 24.0 [php]
Nov 30:
kurt kurtsmetana.com 31.02 26.46 1.1
Top Process %CPU 26.0 [php]
Top Process %CPU 25.0 /usr/bin/php xmlhttp.php
Top Process %CPU 22.0 [php]
Nov 29:
kurt kurtsmetana.com 23.71 21.74 0.7
Top Process %CPU 26.0 [php]
Top Process %CPU 25.0 [php]
Top Process %CPU 23.0 [php]
==
In order to have your service reactivated, please let us know how you plan to reduce the resources consumed by your site.
If you would like to upgrade to a VDS or Dedicated Server please let us know.
Regards,
- Brian Dial
Technician
Here is hmlhttp.php, found in /MYBB, which is one of the problematic scripts
<?php
/**
* MyBB 1.2
* Copyright © 2006 MyBB Group, All Rights Reserved
*
* Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html
*
* $Id: xmlhttp.php 3030 2007-04-26 00:19:47Z Tikitiki $
*/
/**
* The deal with this file is that it handles all of the XML HTTP Requests for MyBB.
*
* It contains a stripped down version of the MyBB core which does not load things
* such as themes, who's online data, all of the language packs and more.
*
* This is done to make response times when using XML HTTP Requests faster and
* less intense on the server.
*/
define("IN_MYBB", 1);
// We don't want visits here showing up on the Who's Online
define("NO_ONLINE", 1);
// Load MyBB core files
require_once "./inc/init.php";
$shutdown_queries = array();
// Load some of the stock caches we'll be using.
$groupscache = $cache->read("usergroups");
if(!is_array($groupscache))
{
$cache->updateusergroups();
$groupscache = $cache->read("usergroups");
}
$fpermissioncache = $cache->read("forumpermissions");
// Send no cache headers
header("Expires: Sat, 1 Jan 2000 01:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
// Create the session
require_once MYBB_ROOT."inc/class_session.php";
$session = new session;
$session->init();
// Load the language we'll be using
if(!isset($mybb->settings['bblanguage']))
{
$mybb->settings['bblanguage'] = "english";
}
if(isset($mybb->user['language']) && $lang->language_exists($mybb->user['language']))
{
$mybb->settings['bblanguage'] = $mybb->user['language'];
}
$lang->set_language($mybb->settings['bblanguage']);
// Load the language pack for this file.
if(isset($mybb->user['style']) && intval($mybb->user['style']) != 0)
{
$loadstyle = "tid='".$mybb->user['style']."'";
}
else
{
$loadstyle = "def=1";
}
$query = $db->simple_select(TABLE_PREFIX."themes", "name, tid, themebits", $loadstyle);
$theme = $db->fetch_array($query);
$theme = @array_merge($theme, unserialize($theme['themebits']));
// Set the appropriate image language directory for this theme.
if(!empty($mybb->user['language']) && is_dir($theme['imgdir'].'/'.$mybb->user['language']))
{
$theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->user['language'];
}
else
{
if(is_dir($theme['imgdir'].'/'.$mybb->settings['bblanguage']))
{
$theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->settings['bblanguage'];
}
else
{
$theme['imglangdir'] = $theme['imgdir'];
}
}
$charset = $lang->settings['charset'];
-----------------------
and here is index.php, the other problematic script
<?php
/**
* MyBB 1.2
* Copyright © 2006 MyBB Group, All Rights Reserved
*
* Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html
*
* $Id: index.php 3030 2007-04-26 00:19:47Z Tikitiki $
*/
define("IN_MYBB", 1);
$templatelist = "index,index_whosonline,index_welcomemembertext,index_welcomeguest,index_whosonline_memberbit,forumbit_depth1_cat,forumbit_depth1_forum,forumbit_depth2_cat,forumbit_depth2_forum,forumbit_depth1_forum_lastpost,forumbit_depth2_forum_lastpost,index_modcolumn,forumbit_moderators,forumbit_subforums,index_welcomeguesttext";
$templatelist .= ",index_birthdays_birthday,index_birthdays,index_pms,index_loginform,index_logoutlink,index_stats,forumbit_depth3,forumbit_depth3_statusicon";
require_once "./global.php";
require_once MYBB_ROOT."inc/functions_post.php";
require_once MYBB_ROOT."inc/functions_forumlist.php";
require_once MYBB_ROOT."inc/class_parser.php";
$parser = new postParser;
$plugins->run_hooks("index_start");
// Load global language phrases
$lang->load("index");
$logoutlink = $loginform = '';
if($mybb->user['uid'] != 0)
{
eval("\$logoutlink = \"".$templates->get("index_logoutlink")."\";");
}
else
{
//Checks to make sure the user can login; they haven't had too many tries at logging in.
//Function call is not f
Host has taken my site down, reasons are in their text. PLEASE HELP, this is a very urgent issue, my site is down. Here is the message I received from my host:
Hello Kurt,
I was recently called to your server by a load spike. Upon investigating, I noticed that your account is using a significant amount of resources on the server. Here is a read out of your usages:
kurt kurtsmetana.com 14.57 16.69 0.4
Top Process %CPU 25.0 [php]
Top Process %CPU 24.0 [php]
Top Process %CPU 22.0 /usr/bin/php xmlhttp.php
In case you are unfamiliar with these readouts, here is the general format:
--------------------------------------------------------------
[USERNAME] [DOMAINNAME] [CPU] [MEM] [SQL]
Top Process %CPU [CPU%] [ HIGHEST RESOURCE USING SCRIPT #1]
Top Process %CPU [CPU%] [ HIGHEST RESOURCE USING SCRIPT #2]
Top Process %CPU [CPU%] [ HIGHEST RESOURCE USING SCRIPT #3]
--------------------------------------------------------------
Although the highest usage scripts do not always coincide with the total overall CPU usages, they are often the first place to look when attempting to reduce your resource usage. The exact script causing the high values is not always available in the readouts.
Your account is using 14.57% of all available CPU resources for the entire server. You are also using 16.69% of all memory available for the server. Additionally, you are using 0.4 mysql resources. Typical resource usage for mysql is .1-.2.
Please investigate your account and attempt to reduce your usages. If you have made any signficant changes to any scripts you employ on your account, you may want to consider disabling them to see if your usages drop.
Alternatively, if you'd like to simply upgrade to a plan that offers more CPU/Memory/Mysql resources, you can view our offerings here.
http://ace-host.net/virtualservers.html
http://ace-host.net/dedicatedservers.html
The option to upgrade is not required at this time, but it is not uncommon for popular sites to outgrow a shared hosting environment. At some point in a site's lifetime it is not unreasonable for the site to require more resources than are possible in a shared environment. We do not require an upgrade upon first notice of high resource usages, though contiuous high usages usually indicate the need to upgrade.
Please provide us with an update as to the action taken to reduce your usages. If you have any questions, please let me know.
- Sean Malen
Technician
Hello Kurt,
I have been forced to suspend your account due to continue excessive resource consumption. Below are some more recent resource consumption stats for kurtsmetana.com:
Dec 1:
kurt kurtsmetana.com 27.35 20.74 0.7
Top Process %CPU 36.0 /usr/bin/php index.php
Top Process %CPU 31.0 /usr/bin/php showthread.php
Top Process %CPU 24.0 [php]
Nov 30:
kurt kurtsmetana.com 31.02 26.46 1.1
Top Process %CPU 26.0 [php]
Top Process %CPU 25.0 /usr/bin/php xmlhttp.php
Top Process %CPU 22.0 [php]
Nov 29:
kurt kurtsmetana.com 23.71 21.74 0.7
Top Process %CPU 26.0 [php]
Top Process %CPU 25.0 [php]
Top Process %CPU 23.0 [php]
==
In order to have your service reactivated, please let us know how you plan to reduce the resources consumed by your site.
If you would like to upgrade to a VDS or Dedicated Server please let us know.
Regards,
- Brian Dial
Technician
Here is hmlhttp.php, found in /MYBB, which is one of the problematic scripts
<?php
/**
* MyBB 1.2
* Copyright © 2006 MyBB Group, All Rights Reserved
*
* Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html
*
* $Id: xmlhttp.php 3030 2007-04-26 00:19:47Z Tikitiki $
*/
/**
* The deal with this file is that it handles all of the XML HTTP Requests for MyBB.
*
* It contains a stripped down version of the MyBB core which does not load things
* such as themes, who's online data, all of the language packs and more.
*
* This is done to make response times when using XML HTTP Requests faster and
* less intense on the server.
*/
define("IN_MYBB", 1);
// We don't want visits here showing up on the Who's Online
define("NO_ONLINE", 1);
// Load MyBB core files
require_once "./inc/init.php";
$shutdown_queries = array();
// Load some of the stock caches we'll be using.
$groupscache = $cache->read("usergroups");
if(!is_array($groupscache))
{
$cache->updateusergroups();
$groupscache = $cache->read("usergroups");
}
$fpermissioncache = $cache->read("forumpermissions");
// Send no cache headers
header("Expires: Sat, 1 Jan 2000 01:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
// Create the session
require_once MYBB_ROOT."inc/class_session.php";
$session = new session;
$session->init();
// Load the language we'll be using
if(!isset($mybb->settings['bblanguage']))
{
$mybb->settings['bblanguage'] = "english";
}
if(isset($mybb->user['language']) && $lang->language_exists($mybb->user['language']))
{
$mybb->settings['bblanguage'] = $mybb->user['language'];
}
$lang->set_language($mybb->settings['bblanguage']);
// Load the language pack for this file.
if(isset($mybb->user['style']) && intval($mybb->user['style']) != 0)
{
$loadstyle = "tid='".$mybb->user['style']."'";
}
else
{
$loadstyle = "def=1";
}
$query = $db->simple_select(TABLE_PREFIX."themes", "name, tid, themebits", $loadstyle);
$theme = $db->fetch_array($query);
$theme = @array_merge($theme, unserialize($theme['themebits']));
// Set the appropriate image language directory for this theme.
if(!empty($mybb->user['language']) && is_dir($theme['imgdir'].'/'.$mybb->user['language']))
{
$theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->user['language'];
}
else
{
if(is_dir($theme['imgdir'].'/'.$mybb->settings['bblanguage']))
{
$theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->settings['bblanguage'];
}
else
{
$theme['imglangdir'] = $theme['imgdir'];
}
}
$charset = $lang->settings['charset'];
-----------------------
and here is index.php, the other problematic script
<?php
/**
* MyBB 1.2
* Copyright © 2006 MyBB Group, All Rights Reserved
*
* Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html
*
* $Id: index.php 3030 2007-04-26 00:19:47Z Tikitiki $
*/
define("IN_MYBB", 1);
$templatelist = "index,index_whosonline,index_welcomemembertext,index_welcomeguest,index_whosonline_memberbit,forumbit_depth1_cat,forumbit_depth1_forum,forumbit_depth2_cat,forumbit_depth2_forum,forumbit_depth1_forum_lastpost,forumbit_depth2_forum_lastpost,index_modcolumn,forumbit_moderators,forumbit_subforums,index_welcomeguesttext";
$templatelist .= ",index_birthdays_birthday,index_birthdays,index_pms,index_loginform,index_logoutlink,index_stats,forumbit_depth3,forumbit_depth3_statusicon";
require_once "./global.php";
require_once MYBB_ROOT."inc/functions_post.php";
require_once MYBB_ROOT."inc/functions_forumlist.php";
require_once MYBB_ROOT."inc/class_parser.php";
$parser = new postParser;
$plugins->run_hooks("index_start");
// Load global language phrases
$lang->load("index");
$logoutlink = $loginform = '';
if($mybb->user['uid'] != 0)
{
eval("\$logoutlink = \"".$templates->get("index_logoutlink")."\";");
}
else
{
//Checks to make sure the user can login; they haven't had too many tries at logging in.
//Function call is not f