Sites freezing in middle of update process

Expected behavior

Update process should proceed automatically, quickly and smoothly.

Current behavior

On a few sites I have had to do manual upgrades. On one site the process freezes at “unpacking the update”, on two others it freezes in maintenance mode at “Copying the required files”.

freeze

I have had to restore backups to get the site live again so can’t upgrade to latest version.

1 Like

Thanks for reporting this. When you loaded the site again after a few minutes, what happened?

I haven’t seen this error on any of my own servers. What hosting provider(s) are these sites using? What is their setting for the PHP memory limit?

I also experienced this behavior. It wasn’t easy to track down as my error logs remained clean, but, I eventually found it. It was output buffering. Perhaps your issue is different, but, maybe this can provide some additional clues of what to look for.

Output buffering would mean that the upgrade completes in the background, possibly without sending any more progress messages. It sounds like something different happened here if it was necessary to restore from a backup to continue using the site.

1 Like

Perhaps @ozfiddler can confirm what he meant by had to restore backups to get the site live again … after all, if the site gets stuck mid-upgrade and the admin doesn’t know how to fix it, this would likely precipitate a (perceived) need to restore from backups, even though that’s not required.

1 Like

It went into maintenance mode and stayed there. If I visited the site I got the one line message. If I left the admin area, then tried to return I got the same message. So I was effectively locked out.

It must be some local thing because the three sites are on three different servers and two different hosting companies. And lots of others went through perfectly.

On one of the sites I fixed it by deleting the core files and uploading the 1.0.2 files directly from a download.

I’ll do some checking today and retry and see what happens. Maybe try the @anon71687268 fix from the other post.

Edit. Just tried it again. Same result. When I click the update button it just sits there for about 20 seconds with the spinning thing on the tab. Then it jumps straight to the screenshot above. So it’s not showing it as going through the stages shown on each line, it displays it whole. And the spinning disc is replaced by the site icon, and it stops there.

Yes, this is precisely what I was suspecting.

If the site is in maintenance mode, check the root for a file called .maintenance … removing that file pulls the site out of maintenance mode.

Also, during upgrade, there’s an option set in the database… updater.core_lock (IIRC)…if the update fails, this entry will still persist in the database, thus indicating an upgrade is in progress, and not allowing you to try again. If you remove the entry, you’ll be able to try the upgrade again.

The other post I linked was fixing an issue I’d introduced myself, so, not likely the fix this issue here… I was connecting the dots, just in case.

One is hosted on Zuver (a budget service) and 2 are with Synergy (good quality hosting). I have about 12-15 CP sites on Synergy. Memory limit on Synergy is 128M.

1 Like

I had tried that on the first site. When I visited the site I got a 500 page with the error message: [06-Sep-2019 23:31:29 UTC] PHP Parse error: syntax error, unexpected end of file, expecting ')' in /home/avmaorga/public_html/wp-includes/class-wp-widget.php on line 162 - that’s the site where I eventually did the manual upgrade by uploading the new files.

But I just tried it again on another site and it worked this time. So the update had gone through but it was stuck in maintenance-limbo.

1 Like

Site 3 is different again. Creates core_updater_lock. Freezes at this point:

stalled

But doesn’t get as far as going into maintenence mode. Site stays live and if I refresh the admin panel it goes back to the “please update” message.

Edit: It does create the folder Upgrade → 1.0.2-9ELVil → ClassicPress-release-1.0.2 with the files in there. So it has unpacked the files.

Deleted the core_updater_lock and the whole Upgrade folder and tried again. Same result. These are the files unpacked in the folder:

upgrade

…afraid I’m out of idea’rs; perhaps James’ll have some additional insights that can help reign this issue in.

I’m assuming there should be more files below wp-cron.php?

Yes, for sure… sorry, I thought you’d cut off the screenshot for space… :slight_smile:

Nope that’s it. So looks like the download is corrupted or the unpacking process is interrupted or incomplete?

1 Like

I’m thinking not corrupted since other installs went through. My guess is that the process was interrupted… gremlins, maybe :smiley:

I moved that site to another server with a different host. It now does the same as the other two… that is, gets stuck in maintenance mode. Deleting the maintenance file gets the site up in version 1.0.2.

Strange. I’d probably open an issue for this.

And getting weirder. I wiped the site and reinstalled WP4.9.11. Uploaded the wp-content folder. Imported the database.

So I have a site that looks fine and normal running WP4.9.11. Then I try and use the CP migration plugin that should take me to CP1.0.1. Guess what?

Stuck at exactly the same spot in maintenance mode again.

I have this is the error log…

[08-Sep-2019 02:16:04 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function classicpress_is_dev_install() in /home/mymedyac/public_html/wp-includes/script-loader.php:86
Stack trace:
#0 /home/mymedyac/public_html/wp-includes/class-wp-hook.php(286): wp_default_scripts(Object(WP_Scripts))
#1 /home/mymedyac/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
#2 /home/mymedyac/public_html/wp-includes/plugin.php(515): WP_Hook->do_action(Array)
#3 /home/mymedyac/public_html/wp-includes/class.wp-scripts.php(148): do_action_ref_array('wp_default_scri...', Array)
#4 /home/mymedyac/public_html/wp-includes/class.wp-scripts.php(131): WP_Scripts->init()
#5 /home/mymedyac/public_html/wp-includes/functions.wp-scripts.php(23): WP_Scripts->__construct()
#6 /home/mymedyac/public_html/wp-includes/functions.wp-scripts.php(120): wp_scripts()
#7 /home/mymedyac/public_html/wp-includes/widgets/class-wp-widget-text.php(58): wp_add_inline_script('text-widgets', 'wp.textWidgets....')
#8 /home/mymedyac/public_html/wp-includes/class-wp-widge in /home/mymedyac/public_html/wp-includes/script-loader.php on line 86

And if I wipe the site, reinstall WP4.9.11 and go straight to the CP migration plugin on a completely empty, new site I get the download error where it stops at the unpacking stage - nothing after wp-cron.php. :grimacing: :face_with_head_bandage: