Loading complaint from hosting manager

Loading complaint from hosting manager

by Geoffrey Robertson -
Number of replies: 6
Hi folks,

I have 4 moodles running on WHM/CPanel managed web sites on the one machine. I set the cron "heartbeat" for 5 minutes for each of them and thought it was all going fine until I received complaints from the management. I have since staggered the crons to 27, 28, 29, 30 minutes each. However, I'm surprized that the load spiked to 25%CPU.

osteo osteopath.net.au 10.35 0.54 0.0
Top Process %CPU 25.0 /usr/bin/perl -w /usr/bin/GET -d http://osteopath.net.au/moodle/admin/cron.php

Machine is:
Celeron(TM) CPU 1200MHz
Memory: 1025776k

Comments?

Geoffrey
Average of ratings: -
In reply to Geoffrey Robertson

Re: Loading complaint from hosting manager

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Running a whole copy of perl AND php every time won't help. Try wget, or running 'php' from the command line. Bringing down the frequency helps too, as you've done.
Average of ratings: Useful (1)
In reply to Martin Dougiamas

Re: Loading complaint from hosting manager

by Geoffrey Robertson -
Ah, yes, cranking up perl is a load. Unfortunately there is no lynx or wget on this server.

How do you say

perl -w /usr/bin/GET -d http://osteopath.net.au/moodle/admin/cron.php

in php on the command line?

Geoffrey
Average of ratings: Useful (1)
In reply to Geoffrey Robertson

Re: Loading complaint from hosting manager

by David Delgado -
I guess he is telling about:

/opt/bin/php /web/moodle/admin/cron.php

That is what the "Installation intructions" in Moodle Documentation tells.

Anyway, at least in Red Hat Linux 9 hosting, I think it should be:

/usr/bin/php /home/user/public_html/moodle/admin/cron.php

Anyway, you would better confirm this with your server admin or support service before using it in your cron job.

If you are the server admin, and you have moodle in your main web directory, it would be just:

/usr/bin/php /var/www/html/moodle/admin/cron.php
Average of ratings: Useful (1)
In reply to David Delgado

Re: Loading complaint from hosting manager

by David Delgado -
Just one more thing: if you want to make your cron better and silent, and do not want to get emails from it, just put:

/usr/bin/php -q /home/user/public_html/moodle/admin/cron.php >/dev/null
Average of ratings: Useful (1)
In reply to David Delgado

Re: Loading complaint from hosting manager

by Geoffrey Robertson -
Thanks for that information David. I've now
got my 4 moodles behaving better.

I'm not sure why I didn't see the php option on the moodle docs myself. I did read (skim) them several times.