Strange behavior with automatic backups (Moodle takes coffee break in middle of work?)

Strange behavior with automatic backups (Moodle takes coffee break in middle of work?)

by Lukáš Mižoch -
Number of replies: 5

Hello. I have Moodle 2.6 with cca 50 courses. Every day at 02:00 Moodle makes automatic backups. Everything is OK, but after cca 20th course Moodle make pause for cca 2 hours and then continues. I check server logs for errors, but there are no signs of any problem. Any idea, why is Moodle taking coffee break? smile

Attachment zalohy.png
Average of ratings: -
In reply to Lukáš Mižoch

Re: Strange behavior with automatic backups (Moodle takes coffee break in middle of work?)

by Séverin Terrier -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Hi,

I suppose that if you could log cron execution reports, you would have the answer in it. Automatic backups take a long time, and if your script execution time is not defined so long, your cron hangs.

Then, latest cron executions wait some time (1h30 if i remember well) before starting automated backups again...

You can find information about that in file backup/util/helper/backup_cron_helper.class.php in the get_automated_backup_state function.

Séverin

Average of ratings: Useful (1)
In reply to Séverin Terrier

Re: Strange behavior with automatic backups (Moodle takes coffee break in middle of work?)

by Lukáš Mižoch -

Hello Séverin, thank you for reply. By script execution time you mean max_execution_time in php.ini?

In cron's log I see this: "Checking automated backup status...RUNNING. Automated backup are already running. Execution delayed." But in process list I don't see cron. Really strange.

In reply to Lukáš Mižoch

Re: Strange behavior with automatic backups (Moodle takes coffee break in middle of work?)

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
You could disable the Moodle cron job in crontab, stop all the pending cron tasks and try running the CLI version of PHP: http://docs.moodle.org/en/Cron#Working_out_the_Moodle_cron_command.
In reply to Visvanath Ratnaweera

Re: Strange behavior with automatic backups (Moodle takes coffee break in middle of work?)

by Lukáš Mižoch -

Running cron.php script from CLI took ~20 minutes and everything was OK. The same script run by cron module ended after 10 minutes and then waited cca 2 hours for continue. Strange. sad

Average of ratings: Useful (1)
In reply to Lukáš Mižoch

Re: Strange behavior with automatic backups (Moodle takes coffee break in middle of work?)

by Albert Ramsbottom -

Did you ever fix this?