Support

Akeeba Backup for Joomla!

#33286 CRON job 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 on Wednesday, 22 July 2020 17:17 CDT

airheads

EXTREMELY IMPORTANT: Please attach a ZIP file containing your Akeeba Backup log file in order for us to help you with any backup or restoration issue. If the file is over 2Mb, please upload it on your server and post a link to it.

Description of my issue:

Cron Jobs using both methods fail. This started with the upgrade to php7 and the new Akeeba core. I had to subscribe to the pro version to continue CRON job backup.

 

php-latest  /nfs/c10/h05/mnt/144724/domains/airheads.org/html/cli/akeeba-backup.php and php-latest /nfs/c10/h05/mnt/144724/domains/airheads.org/html/cli/akeeba-altbackup.php   Log files:

https://www.dropbox.com/s/ojrzb2tsaf23v34/AkeebaErrors.zip?dl=0

 

airheads

Also fails with Webcron....

 

 

airheads

Update: If I set Webcron to 3600 timeout, the backup completes after 40 minutes.

We did not have these issues before, front end backups were more like 10-15 minutes with the alternate backup from a CRON job.

Never could get a real CLI job to work.

Why would it be so much longer now and that I can't get anything to happen with my Media Temple CRON jobs ?

nicholas
Akeeba Staff
Manager

First of all, thank you for your subscription!

Regarding the backup speed, Akeeba Backup 7 is nearly 10% faster than Akeeba Backup 6 but this is mostly seen in files backup., not database backup I can tell you what I see in the (partial) log files you've sent me. You have a big database. At the 15' mark Akeeba Backup was still backing up the database and that's as fast as PHP can go – there's barely any room for performance improvement there, about 0.1% that would come with great pain and a massive time investment. Understandably, it doesn't make sense for us to pursue that. In any case, it makes sense that your entire backup would take 40' or so to complete. Backing up the database is always the major bottleneck in any backup operation. Not just with Akeeba Backup but even with MySQL's own mysqldump! Take it from someone who migrated two development environments with MySQL databases several GBs big on new laptops in the last 10 days. Backing up and restoring the databases was the bulk of my time. Backing up and restoring 4x bigger file data took a tenth of that time. That's an insane difference but it's also reasonable due to the way databases work. At best you can look for any database data you don't need to back up and exclude it from your backup. Besides that there's really nothing you can do to speed up your backup.

Regarding the CLI backup, your log file says it works. However, after about 7' to 15' your host terminates it. This is not under our control. This is something implemented on your server, by your host. It's the CPU time limit in the Linux user limits (ulimit -t). After the CRON job has used the CPU for this many seconds the process is terminated. The fact that it seemingly takes a random amount of time when using the akeeba-altbackup.php script is reasonable and expected. The time limit is applied to the akeeba-altbackup.php script which merely calls a URL and waits for it to return. It only consumes CPU time when sending the request and receiving the response. The backup itself doesn't consume CPU time in the same process. Since the backup itself runs inside a web server thread it may go a bit slower or faster depending on the server load. This, in turn, changes the "wall clock" time that elapses for the same amount of work expended by the akeeba-altbackup.php script. I understand how counter-intuitive this is. It messed with my head 15 years ago when I first encountered this behavior. Once I understood the difference between CPU time and wall clock time it made perfect sense for very Engineer values of "perfect sense".

So, to sum it up. Your site has a big database. Backing it up takes a lot of time. This is the limiting factor to what you can and cannot do. You may be able to convince your host to increase the CPU time limit for your CRON jobs to run backups without WebCRON unless you're on shared hosting or a cheaper VPS. If they decline: WebCRON works for you, keep it as a viable option.

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!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

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!