First of all this has been addressed and basically ignored --> http://www.boonex.com/unity/blog/entry/xml_php_resource_hog_confirmed_
it has not gone away, if anything it has gotten worse.
i think code satori mentioned there were a few areas where the xml.php file is located on the dolphin platform. the issue i am seeing is coming from basically two locations /flash/xml.php /modules/boonex/xml.php (might be wrong on this one, im tired, been staring at processes run for the past hour. the images will tell the story.
I monitored two servers, both are shared hosting environments with ~20 accounts hosted on each one. of those accounts, there are ~7 of those sites that have more than 5 members. there are two accounts that have in excess of 3k members, these are for testing purposes and are not jacked stolen, ripped off with the infamous mods that are sold here for that purpose.
To start with the site(s) images i am depicting have been edited to protect the account owner, i have blottered out the account name for their protection. the first site i am talking about here, has exactly 18 members, and none were online when the RESOURCE SPIKES were taking place.
what is the requirement here for the /modules/index.php to hit this type of CPU spike?
here it is again from another account and from same server. except this one shows the /flash/XML.php file acting up as well.
seriously what could the /modules/index.php need with 71% CPU? note the mysql process was included so you could see which machine this was coming from.
as you can see this is from a different server, and just watch how crazy this gets.32% really isnt that bad, and it really is only for a burst. but there is something causing this, and its not site activity, there is something in the application that needs to be looked at. why would a menu query on a site with no activity spike to 32% CPU. this just doesnt make sense. now this site really gets crazy, and i just dont understand this whole ordeal. this has been discussed and those of us who spent our time exploring and investigating were essentially ignored. that could prove to be the case on this go-round as well, but i sure hope not. there are accounts being suspended from the hosts who are listed on the recommend hosting page, irony, accident, or by design. so you grab a hosting package for $4.95/month two months later, you are told you are suspended for excessive resource usage, and will need to upgrade to VPS. hmmmm, i will not elaborate on this because that is not what this is about to me at this moment, but you have all read the posts in the forums where members were suspended and told they would need to upgrade to VPS.
/flash/XML.php --> /modules/index.php --> /member_menu_queries.php. resource usage not all that bad you might say on this one. not really, but again, there is nobody on this site, there is no activity on the site. so what is causing this?
without running an actual timer on these occurrences, i would guess that the time between spikes is about 1 minute. same files spiking the CPU.
now this spike is not something i see often, but thought it interesting the CPU spike with no users on this account at the time of the spike. logically how many people would you think would need to hit this blog at one time, in order to knock off this type of resource? i dont have any idea, but these are not issues that can be managed from the server-side. this is directly related to the source code.
and i dont have a clue what the heck happened here. browse.php seriously guys, what would cause this, it certainly isnt traffic.
this is just an idea of what resources are used on the cron jobs. and if setup based on the required suggestion from the developers, to run every minute on the minute, this is heavily resource intensive. what is causing the CPU usage on these cron jobs? since they are running from the database, shouldnt they be more optimized than this? how come this only started with dolphin 7, this was not an issue with Dolphin 6?
this is not a bug report, this is not a complaint, this is a blog about what i see going on with the Dolphin 7 platform. there was an instance where we were told to turn off the profiler, then told to turn on the profiler. which is it, and what is causing these CPU spikes?
hopefully we can get some resolution. AlexT or any other developer who wishes to have access to my servers, please inquire, you can certainly take a look. i would also like to see the processes that are running on the demo-dolphin site you guys run, because there were times when it was pegged out i am sure, and you have a great deal of members on that site. but a site with 18 members, should not be spiking the CPU +20% muchless the astonomical amount that you see depicted in these images.
Regards,
DosDawg
HoustonLively, i had to edit my post in order to provide a definitive answer. since you are not allowed to add images to the post comments.
HL as soon as i read your inquiry, i went to check on the status. The above is what was being used. Then i just sat there and watched and it took ~15 minutes, but the results were astonishing:
so as you can see, even though you killed all instances of the IM, there is still something running the /flash/XML.php file, and its still spiking the CPU. Weird thing is this is ~76 lines of code, and using 70% of the CPU.
I have this strong suspicion that the ilnes 17 - 22 have something peculiar to do with this CPU spike. Since the security mechanism was broken upon release, and nothing has been done to fix it, we were only told to disable it, and that they would get to it at a later date.
define('BX_SECURITY_EXCEPTIONS', true);
$aBxSecurityExceptions = array(
'POST.data',
'REQUEST.data',
);
now to see the entire /flash/XML.php file
<?
/***************************************************************************
*
* IMPORTANT: This is a commercial product made by BoonEx Ltd. and cannot be modified for other than personal usage.
* This product cannot be redistributed for free or a fee without written permission from BoonEx Ltd.
* This notice may not be removed from the source code.
*
***************************************************************************/
$sModule = isset($_REQUEST['module']) ? $_REQUEST['module'] : "";
$sAction = isset($_REQUEST['action']) ? $_REQUEST['action'] : "";
if(($sModule == "mp3" && $sAction == "screenshot")
|| ($sModule == "board" && $sAction == "transmit")
|| ($sModule == "games" && $sAction == "makeShot")
|| ($sModule == "livecam" && $sAction == "channelShot")
|| ($sModule == "photo" && $sAction == "transmit"))
{
define('BX_SECURITY_EXCEPTIONS', true);
$aBxSecurityExceptions = array(
'POST.data',
'REQUEST.data',
);
}
$sGlobalHeader = "modules/global/inc/header.inc.php";
if(!file_exists($sGlobalHeader)){ header("Location:install/index.php"); exit;}
require_once('../inc/header.inc.php');
require_once($sGlobalHeader);
require_once($sIncPath . "constants.inc.php");
require_once($sIncPath . "db.inc.php");
require_once($sIncPath . "xml.inc.php");
require_once($sIncPath . "functions.inc.php");
require_once($sIncPath . "apiFunctions.inc.php");
require_once($sIncPath . "customFunctions.inc.php");
$sModule = empty($sModule) || !secureCheckWidgetName($sModule) ? GLOBAL_MODULE : $sModule;
$sContents = "";
$sContentsType = CONTENTS_TYPE_XML;
if($sModule == GLOBAL_MODULE)
{
require_once($sIncPath . "xmlTemplates.inc.php");
require_once($sIncPath . "actions.inc.php");
}
else
{
$sModuleIncPath = $sModulesPath . $sModule . "/inc/";
require_once($sModuleIncPath . "header.inc.php");
require_once($sModuleIncPath . "constants.inc.php");
require_once($sModuleIncPath . "xmlTemplates.inc.php");
require_once($sModuleIncPath . "customFunctions.inc.php");
require_once($sModuleIncPath . "functions.inc.php");
require_once($sModuleIncPath . "actions.inc.php");
}
switch($sContentsType)
{
case CONTENTS_TYPE_XML:
//--- Print Results in XML Format ---//
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header ('Content-Type: application/xml');
$sContents = "<?xml version='1.0' encoding='UTF-8'?>" . makeGroup($sContents);
break;
case CONTENTS_TYPE_SWF:
header("Content-Type: application/x-shockwave-flash");
break;
default:
break;
}
echo $sContents;
$oDb->disconnect();
?>
then looking at this file, /flash/XML.php i see where it calls /modules/global/inc/header.inc.php and this file has what looks like a bunch of garbage code in it. why would you need to define the database parameters again for this file, and what is this exactly doing, and why. there is no user parameters, and there are no actual database queries here, so why would you need to have all of the database parameters here again, when you have them in the /inc/header.inc.php file? why would we just not require /inc/header.inc.php in this instance.
/**
* Data Base Settings
*/
if(!defined("DB_HOST")) define("DB_HOST", $db['host']);
if(!defined("DB_PORT")) define("DB_PORT", $db['port']);
if(!defined("DB_SOCKET")) define("DB_SOCKET", $db['sock']);
if(!defined("DB_NAME")) define("DB_NAME", $db['db']);
if(!defined("DB_USER")) define("DB_USER", $db['user']);
if(!defined("DB_PASSWORD")) define("DB_PASSWORD", $db['passwd']);
if(!defined("DB_PREFIX")) define("DB_PREFIX", "Ray");
if(!defined("GLOBAL_MODULE")) define("GLOBAL_MODULE", "global");
if(!defined("MODULE_DB_PREFIX")) define("MODULE_DB_PREFIX", DB_PREFIX . ucfirst($sModule));
does that appear to be a bunch of garbage that is essentially useless?
there's some more of the story. i do see that the ones who should be reading this are avoiding this post. interesting to say the least. i think i will go invite the powers to come take a looksee.
I then told them to un install the regular messenger to see what the load would be. have not heard back yet.
You know the new server i built at home had the same problem and i un installed those two modules and now i run at see more
If i had the funds to fix this "BAIT and SWITCH" tactic, i would do it for sure. Any idea on what you would charge for this ?
xx.xx.xx.xx - - [18/Aug/2010:13:31:00 -0400] "GET /flash/XML.php?module=im&action=updateInvite&recipient=3&_t=1282152666655 HTTP/1.1" 200 70 "http://mysite.com/" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8"
I disabled the IM module to see if things get any better
$rResult = getResult("SELECT `SenderID`, `Message` FROM `" . MODULE_DB_PREFIX ."Pendings` WHERE `RecipientID`='" . $sRspId . "'" . $sBlocked . " ORDER BY `ID` DESC");
//--- if there is a message return it and some information about it's author ---//
while($aMsg = mysql_fetch_assoc($rResult))
{
$aUserInfo = getUserInfo($aMsg['SenderID']);
$sContents see more
- Database query for new messages
- Database select query inside function getBlockedUsers()
- Database select query and data processed inside function getUserInfo()
- Data parsed into XML via function parseXml()
- Database delete query
If you do all of the above at 5 second intervals, and dozens of users are online, it will definitely take its see more
If you open up /flash/XML.php and read through just the files it requires — no less than 16 external files required, and I dread the thought of going to look them all up to see how much processing overhead they may produce, aside the obvious memory consumption see more
Strange thing is, I can't find any other references to 'updateInvite' or 'serviceGetInvitation' in the code, including no explicit call to serviceGetInvitation() for creating the javascript that should call the 'updateInvite' action.
So... I have a Boonex 'Messenger' module, a Boonex 'Simple Messenger' module, and a Flash IM module.
Can someone explain to me wtf we need all these messenger modules for? Uninstalling the 'Messenger' and 'Simple Messenger', and disabling the flash IM seems to have shut everything up. I'm quite content to leave it that way.
Dawg, can you check to see if my see more
i posted a response to your inquiry, back to the original post, because i am not allowed to provide images here. so go back to the original post, and you will see two screen shots. not as bad as it was yesterday, but not what i would consider great either. the /flash/XML.php file is spiking ~15 minutes. so there is still something going on.
i also added some information on what i was seeing in the /flash/XML.php and what it requires, then looking at some of the files that are required, the see more
CodeSatori is on the right track with what he found. Something to think about, XML parsing can use a lot or resources. For the type of data that is being returned are all of these includes, functions, templates, and parsers really needed?
What if there was a very simple 'pending notices' table and instead of issuing multiple requests for different information across may tables see more
Andrew
AlexT
Igor
AntonL
of these four, we would hope that we could find an answer with this issue, and not declare it as an enhancement to not have the CPU spiked on the server.
Regards,
DosDawg
well the problem here and i was actually told thank you, is that this has been a persistent problem since the release of Dolphin v7.0B, it has been widely discussed and swept under see more
sorry for this post
So - any php script consumes some considerable amount of CPU when it is executing, but it is lasting very fast.
The reason that you see XML.php in the processes is that this file is executing more often than others (every N seconds from each user) ... since it is executing more ofter it is more likely that this file will be in processes list.
I will try see more
thanks for the effort of the response. I am not by any means trying to start trouble here, but your answer is really not acceptable. first of all, it appears that you have not even read what was posted. the sites this is happening on, are sites where there is no traffic, 18 members on the one site. so what would happen if this site were to grow to 5k or 10k members, what would happen to the CPU if the XML.php is going to consume 100% for any given period of time, and its longer than 0.1- see more
I am not clear on your explanation that PHP consumes as much resources as possible. I dont think this is factual, i can test this, and see more
There needs to be one simple check first. Is the module installed and being used if not then move along to something else or die...
HL had a good point as well do we really need 5 different ways to chat on 1 site. Sure everyone wants to be see more
http://www.boonex.com/unity/blog/entry/Ongoing_Update
The chat room sucks on my site, because no one knows who's in there or when they are in there, so everyone uses the shout box, and then if its personal, they use the simple messenger. I removed the video messenger and I may remove the damn chat room because its useless!
I keep removing modules left and right see more
If you read through the files associated with action, it's obvious that there's a huge amount of see more
http://meteorserver.org/
It will require a unique server setup, but just glancing through the docs, server setup looks quite simple. Obviously, not all hosting companies would be able or willing to do this, so a standard short see more
See photo
http://ups.imagup.com/ano1/1282399623.png
Now I am with Business Class and four times more expensive and if BoonEx can not solve this big problem I migrate my site of Dolphin on script less potent as vldPersonals or Social Engine
but I hope a solution will be found, because I like Dolphin
However, there's little point in the community preparing ready fixes for issues like this, if the software developers themselves can't see the problem. Give a man a fish, and all that -- would be sound see more
I guess it really is up to the coders of dolphin to either provide a fix or just let it go like its been since december....
Regards,
DosDawg
Nothing was provided to me yet!
the email was sent Aug. 20, 2010 4:40 AM EST, to the boonex.com email address you provided me in the PM. can you check in your garbage can, or provide me with an alternative email to forward this one to?
Regards,
DosDawg
Regards,
DosDawg
It was in spam folder for some reason, only now I've found it.
But unfortunately the access you provided is not working.
Regards,
DosDawg
I've got the access now, investigation is in progress...
many thanks for your time. working on suggestions, and will keep this post updated if there is any significant difference in performance with utilizing the cache system on mysql. however, the mysql process is not the one that is ripping the CPU, but willing to try anything.
your time is valuable, and your assistance in this matter is greatly appreciated from the community.
Regards,
DosDawg
@CodeSatori,
you are invited as well to investigate my servers, I've installed Munin at see more
You may be able to fine-tune your server so as to keep the process from going totally out of control, but this doesn't really address the actual issue, which is in the bloated process inside Dolphin itself causing this see more
1) suPHP - this main part of the problem, this is most inefficient PHP configuration also known as CGI (suPHP is the same CGI with exception that every request is running under particular user ID, it adds additional level of security). With a lot of small requests it causes high load on the server, because apache has to load php entrepreneur and run separate php process each time see more
the time you spent looking at my two servers was greatly appreciated. However, you were looking in the wrong place, because I have no other HIGH CPU usages on anything except the dolphin script. So pointing out that there are inefficient configuration settings, is 100% inaccurate. You mentioned to me that there were apache modules that can cause high load, keyword there 'can', but they are not, your statement above says 'inefficient server configuration settings that can cause high server see more
I have explained to you what is the problem many times.
We can and we will optimize dolphin performance, but all we can do is about 10%-50% of performance increase, and you as hosting provider can do more than 1000% by changing server configuration.
Just to be clear here: The problem here is with an inefficient script, and while many (common) server configurations see more
The see more
no sir, i have in fact made sure that your suggestions were heeded. however, you persistence on the fact that every other application, module, or otherwise, anything remotely related to dolphin would be the cause of the excessive CPU resources on specific Dolphin files, is what i find to be a tad annoying. Yes you pointed out some issues you considered would help with optimization of the server, however, I can show you on dedicated servers where this problem is in existence as well.
yes see more
that would be a very good presumption. since we see every day in the forums where a member has been suspended for excessive resource usage, and most times they have less than 20 members on their site. but as elaborated by AlexT, this is a server configuration issue, however, the exact server configuration that is required by dolphin 7 as it stands today, has not been revealed. hmmmph
Regards,
DosDawg
who uses it, there are examples?
My host is one of the Top Providers listed and they suggested shutting down modules and loading 1 at a time to find the culprit. I guess I'll start with the Messengers.
I'll see more