We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Cron Job makes my server high load [Answered] | Forum

Simone
Simone May 26 '14
Hi, 

I have buyed arvixe host service and some plugin and themes (all original).

After 1 week my site go very slow with 50 users.

I asked hosting service why and they told me that the problem is cron job so now i paste my run.php script if anyone can help me....thank you very much and sorry for my english...


define('_OW_', true);
define('DS', DIRECTORY_SEPARATOR);
define('OW_DIR_ROOT', substr(dirname(__FILE__), 0, - strlen('ow_cron')));
define('OW_CRON', true);
require_once(OW_DIR_ROOT . 'ow_includes' . DS . 'init.php');
if ( !isset($_GET['ow-light-cron']) && !OW::getConfig()->getValue('base', 'cron_is_configured') ){    if ( OW::getConfig()->configExists('base', 'cron_is_configured') )    {        OW::getConfig()->saveConfig('base', 'cron_is_configured', 1);    }    else    {        OW::getConfig()->addConfig('base', 'cron_is_configured', 1);    }}
OW::getRouter()->setBaseUrl(OW_URL_HOME);
OW::getPluginManager()->initPlugins();$event = new OW_Event(OW_EventManager::ON_PLUGINS_INIT);OW::getEventManager()->trigger($event);
//init cache manager$beckend = OW::getEventManager()->call('base.cache_backend_init');
if ( $beckend !== null ){    OW::getCacheManager()->setCacheBackend($beckend);    OW::getCacheManager()->setLifetime(3600);    OW::getDbo()->setUseCashe(true);}
OW::getThemeManager()->initDefaultTheme();
// setting current theme$activeThemeName = OW::getConfig()->getValue('base', 'selectedTheme');
if ( $activeThemeName !== BOL_ThemeService::DEFAULT_THEME && OW::getThemeManager()->getThemeService()->themeExists($activeThemeName) ){    OW_ThemeManager::getInstance()->setCurrentTheme(BOL_ThemeService::getInstance()->getThemeObjectByName(trim($activeThemeName)));}
$plugins = BOL_PluginService::getInstance()->findActivePlugins();
foreach ( $plugins as $plugin ){    /* @var $plugin BOL_Plugin */    $pluginRootDir = OW::getPluginManager()->getPlugin($plugin->getKey())->getRootDir();    if ( file_exists($pluginRootDir . DS . 'cron.php') )    {        include $pluginRootDir . DS . 'cron.php';        $className = strtoupper($plugin->getKey()) . '_Cron';        $cron = new $className;
        $runJobs = array();        $newRunJobDtos = array();
        foreach ( BOL_CronService::getInstance()->findJobList() as $runJob )        {            /* @var $runJob BOL_CronJob */            $runJobs[$runJob->methodName] = $runJob->runStamp;        }
        $jobs = $cron->getJobList();
        foreach ( $jobs as $job => $interval )        {            $methodName = $className . '::' . $job;            $runStamp = ( isset($runJobs[$methodName]) ) ? $runJobs[$methodName] : 0;            $currentStamp = time();            if ( ( $currentStamp - $runStamp ) > ( $interval * 60 ) )            {                $runJobDto = new BOL_CronJob();                $runJobDto->methodName = $methodName;                $runJobDto->runStamp = $currentStamp;                $newRunJobDtos[] = $runJobDto;
                BOL_CronService::getInstance()->batchSave($newRunJobDtos);
                $newRunJobDtos = array();
                $cron->$job();            }        }    }}

The Forum post is edited by ross May 29 '14
ross Team
ross May 26 '14
are you on a shared server or vps?
Pete
Pete May 26 '14
just change your cron setting to every 15 mins ,
Simone
Simone May 26 '14

Quote from ross are you on a shared server or vps?
I'm on shared server, but I buy it from oxwall store, they have garanted me that the community works well with this supscription



Quote from Pete just change your cron setting to every 15 mins ,

I've set every 6 hour but i've same problem...


Thanks for reply me <3

Simone
Simone May 26 '14

Quote from ross are you on a shared server or vps?
I have arvixe PersonalClass hosting service
ross Team
ross May 26 '14
Simone, if you use shared account, it usually can handle only up to 10 active members, when you exceed this amount, definitely your website will be slow because cron needs to do a lot of work. 

Of course that depends on, which plugins you have on your website, how many concurrent users you have, how many active members you have on your website, how many other websites are on the server which you use as well. 


If you have 50 active users I recommend you to move to VPS

The Forum post is edited by ross May 26 '14
Simone
Simone May 27 '14

Quote from ross Simone, if you use shared account, it usually can handle only up to 10 active members, when you exceed this amount, definitely your website will be slow because cron needs to do a lot of work. 

Of course that depends on, which plugins you have on your website, how many concurrent users you have, how many active members you have on your website, how many other websites are on the server which you use as well. 


If you have 50 active users I recommend you to move to VPS

Thank you Ross,

I was disappointed because in the hosting section of Oxwall's site, Arvixe said that he could make the program work, but without specifying the number of users.I think that a community have a lot of active user, like 1000.10 users isn't a community, is a family community.I think that Oxwall must specify the requiments of users. For example:less of 20 users: all sharing serverless of 100 users: vps with 3gb ram and 4 core cpuetc...If i would like to have more of 10000 active users i must spend 200 euros every month.But in this case i must chose other hosting service, like ning.What do you think?Thank for your support.Simone

ross Team
ross May 27 '14
Simone, I'm really sorry I don't follow your last request. What should I assist you with? In regards or requirements for hosting plans or hosting providers? Please specify.
Simone
Simone May 27 '14
Sorry for my bad english :D

I wanted to say in regards or requirements for hosting plans

Thank u

Webster Molaudi
Webster Molaudi May 27 '14
@ Simone,

I had the same issue with Arvixe, i suggest you move to Siteground Geeg hosting option. ever since i moved to then i never had issue with oxwall. i have more than 60+ plugins running on my site and i never overload my shared server nor do i have cron issues. My cron is set to 30 minutes as siteground says its best for shared servers to avoid overload.
The Forum post is edited by Webster Molaudi May 27 '14
ross Team
ross May 27 '14
Simone, I believe it is common sense the bigger your website is the more powerful hardware you need to use to handle the load. Let alone there's a lot of info on the internet and you might contact support team either oxwall or hosting to get that info. 
bobbi
bobbi May 27 '14
i use arvixe, i chose the package where oxwall is pre installed and pre configured, i didnt have to do a thing the cron is already set up for you as well, i paid for the hosting, pointed my domain at their servers and in less than 24 hours as i had to wait for propagation my site was back online, i am on business class but this is only because i got a free upgrade from personal as the server i was on along with a few other servers was having issues which have now been resolved, my site has 60 members but there is never more than 7 or 8 online at any time i have never used all resources on personal or business

Simone
Simone May 27 '14
hi all,

i have buyed 1 month of vps class arvixe with ningx and eAccelerator preinstalled.

If you are curious i'll tell you how it works

Simone
Simone May 29 '14
Ok the problem was integrated im messanger.

with cometchat ti works well

bye bye

Pete
Pete Jun 11 '14
If you were running your cron every 6 hours ,then there is no way it can be your cron ,its probably because there is far to many hosting account on the shared hosting server .
Abu Road Escort
Abu Road Escort Jul 20 '22
lucknow escort |<|>| kanpur Escorts |<|>| agra Escorts |<|>| meerut Escorts |<|>| varanasi Escorts |<|>| Agra Escorts |<|>| Aligarh Escorts |<|>| Allahabad Escorts |<|>| Ambedkar Nagar Escorts |<|>| Auraiya Escorts |<|>| Azamgarh Escorts |<|>| Baghpat Escorts |<|>| Bahraich Escorts |<|>| Ballia Escorts |<|>| Balrampur Escorts |<|>| Banda Escorts |<|>| Barabanki Escorts |<|>| Bareilly Escorts |<|>| Basti Escorts |<|>| Bijnor Escorts |<|>| Budaun Escorts |<|>| Bulandshahar Escorts |<|>| Chandauli Escorts |<|>| Chitrakoot Escorts |<|>| Deoria Escorts |<|>| Etah Escorts |<|>| Etawah Escorts |<|>| Faizabad Escorts |<|>| Farrukhabad Escorts |<|>| Fatehpur Escorts |<|>| Firozabad Escorts |<|>| Gautam Buddha Nagar Escorts |<|>| Ghaziabad Escorts |<|>| Ghazipur Escorts |<|>| Gonda Escorts |<|>| Gorakhpur Escorts |<|>| Hamirpur Escorts |<|>| Hardoi Escorts |<|>| Jalaun Escorts |<|>| Jaunpur Escorts |<|>| Jhansi Escorts |<|>| Jyotiba Phule Nagar Escorts |<|>| Kanpur Escorts |<|>| Kannauj Escorts |<|>| Kanshiram Nagar Escorts |<|>| Kaushambi Escorts |<|>| Kheri Escorts |<|>| Kushinagar Escorts |<|>| Lalitpur Escorts |<|>| Mahamaya Nagar Escorts |<|>| Maharajganj Escorts |<|>| Mahoba Escorts |<|>| Mainpuri Escorts |<|>| Mathura Escorts |<|>| Mau Escorts |<|>| Meerut Escorts |<|>| Mirzapur Escorts |<|>| Moradabad Escorts |<|>| Muzaffarnagar Escorts |<|>| Pilibhit Escorts |<|>| Pratapgarh Escorts |<|>| Rae Bareli Escorts |<|>| Ramabai Nagar Escorts |<|>| Rampur Escorts |<|>| Saharanpur Escorts |<|>| Sant Kabir Nagar Escorts |<|>| Sant Ravidas Nagar Escorts |<|>| Shahjahanpur Escorts |<|>| Shrawasti Escorts |<|>| Siddharth Nagar Escorts |<|>| Sitapur Escorts |<|>| Sonbhadra Escorts |<|>| Sultanpur Escorts |<|>| Unnao Escorts |<|>| Varanasi Escorts |<|>|