Support

Akeeba Backup for Joomla!

#34592 backup using cli stops prematurely

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 Thursday, 25 March 2021 20:17 CDT

mbconsulting

Please look at the bottom of this page (under Support Policy Summary) for our support policy summary, containing important information regarding our working hours and our support policy. Thank you!


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:

If I perform Backup Now the backup completes successfully. It takes about 45 mins for 4.7Gb.

However, my problem is that I have set a cron job using cli and it terminates prematurely after about 10 minutes.

Siteground say there are no PHP errors.

I asked them to set max_execution_time to 7200 but it made no difference.

I have tried the Alice Troubleshooter suggestion (doc3 attached) but with same result. I also tried the Configuration Wizard but no change.

I'm now at a loss.

Regards

Michael Brew

tampe125
Akeeba Staff

Hello,

the script is killed by their policies, the CLI process simply took too much time and after a while they kill the process, to avoid any zombie process to slow down the server.

What you have to ask them is to raise the limits for your Linux user (called ulimit), otherwise your user on the server is flagged for using too much resources (ie time) and gets killed. If that's not possible, you will have to use an external provider to trigger your backups, like WebCron.org

Davide Tampellini

Developer and Support Staff

๐Ÿ‡ฎ๐Ÿ‡นItalian: native ๐Ÿ‡ฌ๐Ÿ‡งEnglish: good โ€ข ๐Ÿ• My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

nicholas
Akeeba Staff
Manager

As they already know โ€” because we've been through that with them when we were hosted there โ€” the problem is not PHP's maximum execution time but the CPU time limits they have set up for each user account (as can be seen by running the ulimit -a command in an SSH session). They have set the CPU time limit to 600 seconds which means that backups on the CLI are killed after approximately 10 minutes. I don't say exactly because CPU time and wall clock time are different.

It is possible for their systems administrator to change the CPU time limit just for your user account to 3600 seconds which should be enough for you to run your backups. This is done by editing the file /etc/security/limits.conf (it's system-wide, that's why their systems administrator must do it). Since this file is read when a login shell is executed it will be applied automatically next time you run a CRON job.

There are more complicated ways to handle it on their side. For example they could set a soft limit of 600 seconds and a hard limit of 3600 seconds which means that by default you only get 10 minutes of CPU time but you could also change your CRON command line to read:

ulimit -t 3600; your_current_command_line_here

The first part says "raise my soft CPU time limit to 3600 seconds, then execute the other command after the semicolon". This is preferable to prevent runaway processes from bogging down the server.

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!

mbconsulting

Nicholas

Thank you very much for your informative and complete explanation.

It gave me the ammunition to present to Siteground. Eventually, they got the message and my backup is working again.

Thank you.

Michael

tampe125
Akeeba Staff

You're welcome! Let me know if you need help on this issue

Davide Tampellini

Developer and Support Staff

๐Ÿ‡ฎ๐Ÿ‡นItalian: native ๐Ÿ‡ฌ๐Ÿ‡งEnglish: good โ€ข ๐Ÿ• My time zone is Europe / Rome (UTC +1)
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!