WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 5 years ago

#7819 closed defect (bug) (fixed)

Interupted update leaves blog in maintenance mode

Reported by: johnhennmacc Owned by: ryan
Milestone: 2.7 Priority: high
Severity: blocker Version: 2.7
Component: Upgrade/Install Keywords: needs-patch
Focuses: Cc:

Description

I have had two occasions when an interrupted automatic WordPress update left a (test) blog permanently stuck in maintenance mode. The cause appears to have been related to network traffic errors in both cases. It leaves me thinking that the automatic update needs to detect these situations and terminate the process gracefully instead of breaking a blog as has happened on me.

Change History (11)

comment:1 DD326 years ago

The most common form of interuption will be the PHP time limit kicking in, The unfortunate thing with this however, is that some hosts will have it set so low, it'll be impossible to ever complete in that time, Maybe some JS is needed to automatically continue the process if the time limit kicks in and cuts the script off..

In adition, the .maintainence file should expire itself after half an hour perhaps if theres no messed up files?

comment:2 jacobsantos6 years ago

The biggest problem is that with the file, you can't access the wp-admin after it goes into affect. It should not restrict you from the wp-admin and should just display for the front end.

comment:3 ryan6 years ago

.maintenance already contains a timestamp. We just need to check it and allow regular loading if the timestamp is more than x minutes old.

comment:4 follow-up: westi6 years ago

  • Keywords needs-patch added
  • Severity changed from normal to blocker

blocker for 2.7 release.

comment:5 in reply to: ↑ 4 jacobsantos6 years ago

Replying to westi:

blocker for 2.7 release.

I think Ryan already committed a correction for this. It would be good if the maintenance.php had a link to the upgrade script. Also, if the upgrade script would remove the maintenance.php file after it was finished, in case the administrator has to access the upgrade manually.

comment:6 ryan6 years ago

  • Owner changed from anonymous to ryan

comment:7 ryan6 years ago

.maintenance is ignore if the timestamp is older than 10 minutes.

We can display a different notice in the admin after the time is up. Mention that the upgrade didn't complete and provide a link to the upgrade page to either try again or remove .maintenance and do a manual upgrade.

comment:8 ryan5 years ago

  • Component changed from Administration to Upgrade

comment:9 westi5 years ago

(In [9348]) Warn if the core updater failed to complete. See #7819.

comment:10 follow-up: ryan5 years ago

Do we need anything beyond that maintenance nag?

comment:11 in reply to: ↑ 10 westi5 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Replying to ryan:

Do we need anything beyond that maintenance nag?

The only thing we may want to consider is a way of removing the .maintenance file if the upgrade has been done manually since or something.

But maybe that should always be a manual part of the manual upgrade if required.

I think this is done for now.

Note: See TracTickets for help on using tickets.