MyBB Community Forums

Full Version: URGENT: Host has suspended my account for having massive connections
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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
Hi,

How many users are registered on your forum? How many visits, new posts, new threads and new content do you receive daily?

It's quite possible that you could be outgrowing the specifications of your VDS plan.
Registered Members 504
However, only 50 of these are neccessarily active.

I will look into that information. However, we have less than 50 active members.

We don't receive that many forum posts, however we do have a shoutbox.

Why would members be firewalled for excessive connections though? Individual members are having over a 100 simultaneous connections, it doesn't make sense.
Posts per day: 45.87
Threads per day: 7.9
Members per day: 4.61
Posts per member: 9.94
Replies per thread: 4.81
Zzzfilesk1 Wrote:Registered Members 504
However, only 50 of these are neccessarily active.

I will look into that information. However, we have less than 50 active members.

We don't receive that many forum posts, however we do have a shoutbox.

Why would members be firewalled for excessive connections though? Individual members are having over a 100 simultaneous connections, it doesn't make sense.

Sounds like a possible exploit, as hosts don't just make up stuff like that. In fact, MyBB is perhaps the least demanding of any forum package, so you probably need to work with your host to deal with this issue and clean up your forum.
Maybe he just has a crappy host?
www.webhostingtalk.com
kjaonline Wrote:Maybe he just has a crappy host?
www.webhostingtalk.com

I'd agree, except that the amount of resources being used is certainly sufficient to get suspended.

Most any shared host would have difficulties with symptoms of that sort.

So I definitely think the person involved should try to work with the host to eliminate the problem. The decision to move, if necessary, can come later.

What happens all too often is that people jump from host to host and encounter the same difficulties without dealing with the source of their troubles.
A friend of mine having similar problem before, asked to upgrade but at last I found it is baseless. Now, since he shift to another hosting provider (known as #1 in our country, also have customers internationally), the cost is less yet we no longer have any problem with the site.

We are still happy with MyBB so far
baguznet Wrote:A friend of mine having similar problem before, asked to upgrade but at last I found it is baseless. Now, since he shift to another hosting provider (known as #1 in our country, also have customers internationally), the cost is less yet we no longer have any problem with the site.

We are still happy with MyBB so far

Indeed that's possible too, but I'd always give the host the benefit of the doubt first before going into door number two.
So no one has any idea what could be the problem?

The point is that individual users are having over a hundred connections at certain instances.

My only guess for the problem is our shoutbox
Zzzfilesk1 Wrote:So no one has any idea what could be the problem?

The point is that individual users are having over a hundred connections at certain instances.

My only guess for the problem is our shoutbox

You may be the victim of some sort of Internet-based exploit, which is why you need to have your host work with you to see what's going on. It sounds security-related to me, but again you have to talk to the host to solve it.
Pages: 1 2