Support

UNiTE, Remote CLI, eXtract Wizard

#22047 CMS Update hangs

Posted in ‘UNiTE and Remote CLI’
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

PHP version
n/a
Tool
UNiTE
Tool version
n/a

Latest post by nicholas on Tuesday, 10 February 2015 11:51 CST

cornelius
I have updated several Joomla sites from 2.5 to 3.3 they all went smooth. But my last site is giving me trouble. Hitting the update button it starts downloading and unpacking. Then when it reaches 82.7 % it stops. After a while there is a server error. The url points to finalise. I go back and the site says it has version 3.3.6. It looks all right but trying to reach joomla comps there is an error. I have pinned it down to the Libraries. Updating them with the libraries from the update package all seems well. But I am not sure if that is realy the case. Manual update gives the same error.
Now I am using CMS update. Without any luck. Installing 3.3.6 it does no more then: "The download is in progress. It may take up to a few minutes. Please do not close this browser tab, do not navigate away from this page and do not let your device go to sleep mode."
Hope you can help me.

nicholas
Akeeba Staff
Manager
You have a server restriction there. When upgrading from Joomla! 2.5 to 3.x a lot of obsolete files and directories have to be removed, otherwise Joomla! throws errors. This is done in the finalisation of the update. If you are using the FTP layer and/or your server has a rather strict PHP time limit (less than 60 seconds) or a strict CPU usage limit this operation will time out and cause the errors you mentioned.

There is only one workaround and it's a bit complicated but it's still better than nothing.

  • You first need to take a backup of your Joomla! 2.5 site and restore it on a local server running something like MAMP, XAMPP, WAMPserver or something similar.
  • Upgrade this local site.
  • Back it up.
  • Keep multiple copies of your original and your upgrade site.
  • Remove all files and folders from your live site. This is a critical step. If you skip it, the upgraded site WILL fail to load.
  • Restore the upgraded site's backup on your live server.


Please remember that smaller updates (e.g. 3.3.5 to 3.3.6 or 3.3.x to 3.4.x) are less likely to fail because the number of files modified between these releases are far less. Less files means less time to run the finalisation. Less time means no timeout / CPU usage issues.

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!

cornelius
Trying to insert a response makes this page hanging. So please take a look at the picture.

nicholas
Akeeba Staff
Manager
According to the message you pasted, you didn't use Akeeba Backup to restore your site locally. I will have to decline any further responses to this ticket as we do NOT provide generic Joomla! support.

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!

cornelius
I most surely did use Akeeba Backup to first backup and then restored it local!

nicholas
Akeeba Staff
Manager
Well, look at the message you sent me in the screenshot. See the double dash? It indicates a comment. See the comment about dumping the contents of the table? This is NOT added by Akeeba Backup. The last time we had something like that in a backup product it was with JoomlaPack back in 2009. There was a backup engine which would call mysqldump (the native command line executable shipped with MySQL) and just include its output in the backup archive. We removed that feature for several reasons including (but not limited to) the lack of standardised output among different MySQL versions and builds and the problems related to managing large database dumps during compression and extraction. So, the message you posted is not coming from Akeeba Backup.

Maybe you mean that the message comes up when performing the update? If this is the case, the error message actually comes from Joomla!, not CMS Update. I'll give you the executive summary.

After extracting the update package's files, the script file administrator/components/com_admin/sql/script.php (supplied by Joomla! in the update package) is executed. This script will remove obsolete files and will update your database. Please let me reiterate that this is Joomla! core code beyond our control.

How is your database updated? The directory administrator/components/com_admin/sql (also shipped with Joomla!, we have no control over it) contains the SQL fiels used to update the database schema from one version of Joomla! to the next. Joomla! stores the current schema version in its own database, in the #__schemas table. The script.php file will read that value, compare it with the list of the .sql files in the directory I just mentioned and will run all files with a version number GREATER than the one stored in the database.

I personally disagree whole-heartedly with this approach. If the wrong schema version is stored in the database the update fails flat. This is what happens in your case. Since this stupid method is also used on components update I have written a better schema updater for use with my own components. It is not part of Joomla! itself (with some good luck it will be included in Joomla! 3.5) and requires the developers to supply the updates in its XML format. As I said too many times already I don't have control over Joomla!'s schema update process so I can't force them to use my better method.

At best you can log in to your site, go to Extensions, Manage Extensions, Database and click on Fix. If that works, very well. If that doesn't work you'll have to seek support from forum.joomla.org because we can't provide support for software we haven't written and the Joomla! database update (script.php and all the .sql files) is not written by us, it's part of Joomla!'s core code.

I hope that this very detailed information helps you understand the nature of your problem and why I can't be of much help.

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!

cornelius
Okay, thank you. I wil seek help at Joomla.org. Ofcourse I did'nt ment to blame your software. I am using it for a number of years. And am happy with it. But you are so good with Joomla and my problem is a difficult one. So.....

The site with the problem is very old 1.5 and was upgraded several times. Once with SP-Upgrade. Maybe we never should have done that. Since then we are expiriencing some weird troubles. Starting all over would be a good thing maybe. But I don't like that. I want to solve the problem.
So thanks once again.
Greetings,
Chris

nicholas
Akeeba Staff
Manager
I didn't say you blamed me. I just said I hadn't explain it properly (my bad!).

Starting from scratch has rarely ever been a good solution. Our site was migrated from 1.0 to 1.5, from 1.5 to 1.7, updated from 1.7 to 2.5, migrated from 2.5 to 3.2 and updated to 3.3 and soon to 3.4. We never ran into trouble. Well, the thing is that I was always very careful when migrating from one J! version to the next and at some point I had to write my own hack-ish scripts to migrate content from K2 on J! 1.5 to Joomla!'s com_content on 1.7/2.5. Not to mention three redesigns which included partial backups and restorations to minimise our downtime (15' to 30' in every single case).

The thing is: you have to experiment. Usually fixing these strange issues takes far less time than rebuilding from scratch and you get bonus experience points. Of course if the site is rather trivial or you have already planned to do massive changes in its structure you might be better off starting from scratch. Just give it some thought before you start waving the sledgehammer to your old site.

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!