Loading complaint from hosting manager

Loading complaint from hosting manager

von Geoffrey Robertson -
Anzahl Antworten: 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
Als Antwort auf Geoffrey Robertson

Re: Loading complaint from hosting manager

von Martin Dougiamas -
Nutzerbild von Core developers Nutzerbild von Documentation writers Nutzerbild von Moodle HQ Nutzerbild von Particularly helpful Moodlers Nutzerbild von Plugin developers Nutzerbild von 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.
Als Antwort auf Martin Dougiamas

Re: Loading complaint from hosting manager

von 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
Als Antwort auf Geoffrey Robertson

Re: Loading complaint from hosting manager

von 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
Als Antwort auf David Delgado

Re: Loading complaint from hosting manager

von 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
Als Antwort auf David Delgado

Re: Loading complaint from hosting manager

von 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.