Support

Akeeba Backup for Joomla!

#19674 Database restore freezes on very large database

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 Tuesday, 01 April 2014 01:26 CDT

maestroc
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:

I am attempting to restore a VERY large database from a 5 part (250mb each) backup set. Restoring files goes fine, then the database restore starts. Around 550000 out of 4132100 bytes into the restore the db restore locks up and sits there.

I own the server, and thus can adjust the settings if need be. Never had a problem until this one and I have restored dozens of sites onto this server in the past. Any idea what I might need to do to get the restore to complete?

Thank you!

nicholas
Akeeba Staff
Manager
Your database backup is 4132100 bytes, or 3.94 Mb. That's a tiny database. Our database backup is a little over 1Gb, more than 250 times more than yours and it's restoring just fine.

The problem I suspect is your host having a MySQL query limit. This means that they allow you to execute a specific number of database operations in a limited amount of time, e.g. 100 queries (database operations) per second. Since the database restoration needs to do a LOT of database operations in a limited amount of time the limit kicks in and halts the restoration script. Please contact your host.

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!

maestroc
Sorry, I misstated the size of the db. It is not 4132100 bytes. It is 4132100 Kbytes. 4,135,766,272 bytes of files (8241 total files) are in the sql directory of the installation folder after kickstart extracts the archive. I optimized some of the settings in mysql and restarted the server but no luck. Same problem as before. Do you happen to know what specific mysql configuration setting you feel I need to beef up in order to allow this import to complete?

Thank you!
-MaestroC

maestroc
Strange. The progress bar froze again at around 200,000Kbytes but I left it there and went on about my business. Came back later expecting to have to start all over again but before doing so went and checked to see if the site would load and it did. So the installer was freezing up but it was still importing the database in the background I guess.

nicholas
Akeeba Staff
Manager
I believe that the problem with the progress bar has to do with the very big size of your database dump, after all. Most PHP versions (anything except the 64-bit PHP on 64-bit Linux) can only handle integers up to 2147483647 which is 2Gb minus one byte. A database backup that's nearly 4Gb will cause miscalculations in the total size and percentage determination. There is a solution to that, but it requires the BCMath extension for PHP which is seldom (if ever) installed on hosts and local server environments. As a result using that solution would break the restoration script for everyone – so it's not a viable solution. You'll have to leave with the lack of feedback I'm afraid.

Which brings me to the next point. How did you end up with a 4Gb database dump?! It would appear that you are backing up analytics data which would ideally be excluded from the backup, or that you are storing entire files in your database which is a really bad practice.

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!

maestroc
Nicholas,

The site I was trying to move had been taken over by spammers and the bad guys had filled the DB with thousands of spam Kunena forum posts. The owner did not want me to go weed whacking to get rid of the junk on his live server so I needed to move it someplace off-site. Now that I have it on my test server I have chopped it down to a respectable 1gig.

Thank you for your awesome software!

nicholas
Akeeba Staff
Manager
You're welcome! And thank you for explaining how you got that huge database dump. It's good to know just how big of a database dump our software can handle on real world servers, live and local.

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!