Support

Akeeba Backup for Joomla!

#13776 Command line cron backup stopps fails

Posted in ‘Akeeba Backup for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Akeeba Backup version
n/a

Latest post by nicholas on Wednesday, 17 October 2012 04:47 CDT

pat01
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? Y
Have I searched the tickets before posting? Y
Have I read the documentation before posting (which pages?)? Y
Joomla! version: 2.5.7
PHP version: 5.3.13
MySQL version: 5.0.95-community
Host: (optional, but it helps us help you)
Akeeba Backup version: 3.6.5

Hello

I use the command line backup with a cron job.

But the backup stopps after a short time.

The cron is correct:
/usr/bin/php /home/nameofwebsitefolder/public_html/cli/akeeba-backup.php
(I did ask the hoster for the path to PHP, so it's correct)

I did try the akeeba-altbackup.php, but the same result.

I did check the settings in Akeeba, they seem to be OK to me.

Backend backup works fine.

Joomla 2.5.7
Akeeba 3.6.5 Pro

Any idea what the problem is?

Thank you very much!

Patrick

nicholas
Akeeba Staff
Manager
Your host seems to be limiting the amount of time a CRON job can execute to 30-35 seconds. This is too little to take a full site backup. Please ask your host to lift this restriction.

Important note: In order to reply to this request, I had to make a reasonable assumption. I assumed that the backup does complete correctly when run from the back-end of the component. If the backup also fails from the back-end of the component please ZIP and attach the log file for the back-end origin, as in this case the problem may be something different.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

pat01
Hello Nicholas

Thank you very much for you fast reply.
Yes, the Backup does complete correctly when running from the backend. Cron/Command line only fails.

I suppose your guess could be CRON job can execute to 30-35 is correct. I'll check that with the hoster and let you know.

Patrick

nicholas
Akeeba Staff
Manager
You're welcome! Please let me know what the host replies.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

pat01
Hi

Here is the answer from my hoster:

The script exceeds the maximum limit of 100MB RAM. You have two possibilities:
- Try to load the data in smaller packages and then delete the variables
- Try to settle the cronjob with several small cronjobs

Server log:
Oct 12 03:00:36 srvXX lfd[1003886]: *User Processing* PID:1003692 Kill:1 User:abcdefg VM:132(MB) EXE:/usr/bin/php CMD:/usr/bin/php /home/abcdefg/public_html/cli/akeeba-backup.php

Is there a way to change the settings in Akkeba?

Thank you very much.

Regards
Patrick

pat01
If I run the Backup from the backend, the JPA-File has the size of 941 Mb.

PS: The Edit-Button here is not working. If I click on it I get a blank page (Firefox 15 and Chrome 22.0).

nicholas
Akeeba Staff
Manager
Regarding the edit button: I know, it's a bug in our ticket system. I was too busy answering support requests this week to fix it :(

Regarding your issue: we can do something about it. Go to Akeeba Backup, select the profile you are using for your CRON jobs and click on the Configuration button. Set the following parameters:
- Minimum execution time: 1 second.
- Maximum execution time: 2 seconds.
- Runtime bias: 75%
Make sure that you have not modified the Archiver Engine parameters. If unsure, take a look at them. None should be set over 5Mb.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

pat01
I did change the settings and I will let you know how it worked out once the next scheduled Cron job was runing.

Patrick

pat01
Unfortunately no luck, the backup keeps stopping :-(

Anything else that can be done?

Thank you very much!

nicholas
Akeeba Staff
Manager
How big is the images/pdf/bild-jun-ea.jpg file? Also, how many files are there in the images/pdf directory?

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

pat01
The file images/pdf/bild-jun-ea.jpg has the size of 3.71 Mb.

The directory images/pdf/ holds 50 files with a total size of 53.4 Mb.

The directory images/ itself including all subdirectories holds 4490 files with a total size of 940 Mb.

If I run the backup from the backend, the JPA file has the size of 941.60 Mb.

nicholas
Akeeba Staff
Manager
OK, it's not that big. I still don't understand why the memory usage climbs over 100Mb. On a site about that size the peak memory usage is around 20Mb during backup.

Let's try something else. Instead of akeeba-backup.php use akeeba-altbackup.php (and make sure you have enabled the front-end backup and added a secret word in the Component Parameters page, as per the documentation instructions). This uses a different backup strategy which is identical to the one used with the (successful, as you said) back-end backup's.

If that still fails I can be sure that the problem is not the peak memory usage but a time limitation in the CRON job.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

pat01
It did fail... same like before.

What I don't understand: why did you say
and make sure you have enabled the front-end backup and added a secret word in the Component Parameters page,

I think this is not needed for CLI backup with akeeba-backup.php and akeeba-altbackup.php, but only for frontend backup?

But anyway, I did as you said ;-)
Unfortunately without any luck.

nicholas
Akeeba Staff
Manager
When using akeeba-altbackup.php you need to enable the front-end backup. For more info: https://www.akeebabackup.com/documentation/akeeba-backup-documentation/alternative-cron-script.html

If you have enabled the front-end backup and akeeba-altbackup.php still fails then we're talking about the CRON job having a maximum execution limit. In this case you cannot do anything. You will have to use a third party service, like webcron.org, to schedule your backups. Unless, of course, your host lifts the time limit on your site's CRON jobs.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

pat01
Yes I did enable frontend-backup with a secret word :-)

The server log clearly shows the memory peak of 100MB.
I will investigate further and post it here if I find out anything else.

Thank you very much for everything.

nicholas
Akeeba Staff
Manager
I do find it very strange to have a 100Mb memory usage from the process running akeeba-altbackup.php. It does run the same algorithm as the back-end backup. I don't know :s

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!