[ Video Sharing CMS v4 ] [Server overload dues to cronjobs FIXED] Just installed and 20 cron jobs

Started by jcgorospe,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jcgorospeTopic starter

Hi,
I just installed the new version of phpvibe pro.
Im hosting at Hostgator, which we all know is shared and limited and all that, but the previous versions (3 or 4 releases back) worked with out a flaw. Just didnt meet my needs at the time.
I had not configured, imported or done anything with the script. Just installed it. There were no videos, no traffic, no anything at all.
About 15 minutes later (hadnt touched anything yet) I had my account blocked because of excessive cpu use.
Started poking around to see what had happened.
Hostgator limits shared accounts to 25 processes. I was at a steady 3 before install and for weeks before that (I monitor closely) and after install my processes jumped to 25.
I had the cron.php running over 20 instances of its self. And thats with out any work or traffic.
I figured it was configuration or lack there of, so I started configuring the script and keeping my eye on cron.php processes. They were usualy at under 10. (10 cronjobs on a site with no videos and no traffic????).
I did notice spikes of upto 18 and back down to 12 or so.
I let it sit for a few hours and I got my account blocked again for excessive cpu.
Hostgator has also identified the script as the problem.

Now for the questions.
What can I do to reduce cron.php use? (even deleteing the file doesnt help).
What has happened to the slim low resource use of phpvibe?

How can I fix this?
The site is zipped, and process is sitting pretty at 2 right now. Never has gone over 5.
Im attaching a screen capture with just a few instances. Wasnt the worst one, but I have 0 videos and 0 traffic.

Help... ?!
  •  

PHPVibe A.

Hi, does the cron last run option get updated?
Look in tools -> Options api

cron_lastrun and cron_interval values.

You can also remove it from index.php (root):
/* Crons trigger */
if(function_exists('exec')) {
$time_passed = time() - get_option('cron_lastrun');
$cron_interval = get_option('cron_interval');

if( $time_passed  > $cron_interval) {
$arrOutput = '';
update_option('cron_lastrun', time());
$binpath = get_option('binpath','/usr/bin/php');
$command = $binpath." -f ".ABSPATH."/cron.php";
exec( "$command > /dev/null &", $arrOutput );
}
}


and execute it (later if needed) from the cpanel cron tab.

jcgorospeTopic starter

Ok I opted for removing it from the index.php.

What does that cronjob do?
How often should I run it?
How do I call it?

Thanks for the very quick answer.

Juan Carlos
  •  

PHPVibe A.

It's used to pull youtube videos automatically (if you need and setup that).
That depends on you.
You can call it from cpanel -> crons

elitepromo

  •  

elitepromo

i tried the above method... with the code .. it didnt work for me  :'(
  •  

PHPVibe A.

You don't need "code" to run it from the crontab, but the path to the file.

Similar topics (7)