Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#7819 closed defect (bug) (fixed)

Interupted update leaves blog in maintenance mode

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


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)

#1 @DD32
14 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?

#2 @jacobsantos
14 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.

#3 @ryan
14 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.

#4 follow-up: @westi
14 years ago

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

blocker for 2.7 release.

#5 in reply to: ↑ 4 @jacobsantos
14 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.

#6 @ryan
14 years ago

  • Owner changed from anonymous to ryan

#7 @ryan
14 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.

#8 @ryan
14 years ago

  • Component changed from Administration to Upgrade

#9 @westi
14 years ago

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

#10 follow-up: @ryan
14 years ago

Do we need anything beyond that maintenance nag?

#11 in reply to: ↑ 10 @westi
14 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.