Make WordPress Core

Opened 11 years ago

Closed 8 years ago

#24578 closed defect (bug) (duplicate)

.maintenance file exists when not needed

Reported by: novasource's profile novasource Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.5.1
Component: Upgrade/Install Keywords: needs-patch
Focuses: Cc:

Description

Responsiveness from the WordPress server that hosts update files was slow earlier today. It took >10 seconds just to get /wp-admin/network/update-core.php to respond as it apparently waited on the WordPress server.

Our network identified 4 themes that needed updating. Downloading and installing these themes took a few minutes.

The problem is that the .maintenance file was left on the server for a very long time, causing that Briefly unavailable for scheduled maintenance. Check back in a minute. message to display for a very log time.

That file needs to only be written to the file system while actual maintenance is ongoing, and it should not be present while waiting on file downloads. This way, if file downloads are taking a very long time, that alone doesn't cause pointless access problems for other users.

I'm not sure if all themes are first downloaded then updated, or if it's a download-update-download-update-download-update pattern. If the latter, them removing the .maintenance file between updates could cause user experience to thrash between uptime and downtime. This would not be good design.

Now, to be clear, we're not 100% sure download slowness was behind this, but we're leaning thay way for a few reasons:

  • No known or observed problems with performance on our corporate internet pipe. This is a university pipe iwth a multi-gigabit connection which isn't being utilized heavily in the summer.
  • Analysis of process performance with top showed nothing amiss. No swapping, plenty of unused CPU capacity.
  • This server hosts two WordPress networks. Nothing in either network was slow except for updating.
  • We've been running WordPress for years here and have never had a prior problem like this with updates.

Change History (4)

#2 @dd32
11 years ago

For Single-Theme/Plugin update processes, the process is:

  • Request
  • Filesystem Connect
  • Download
  • Extract ZIP
  • Enable Maintenance Mode if Multisite OR plugin/theme is in use
  • Update Plugin/Theme
  • Disable Maintenance mode

When the Bulk Upgrader is used however, the process is a bit different, this includes when only one theme or plugin is chosen for upgrade:
For Multisite bulk upgrade:

  • Request
  • Filesystem Connect
  • Enable Maintenance Mode (with a TODO note saying that it should really only be enabled for an individual site rather than globally)
  • For each item:
    • Download
    • Extract ZIP
    • Update Plugin/Theme
  • Disable Maintenance mode

For single site bulk upgrade:

  • Request
  • Filesystem Connect
  • Enable Maintenance Mode if any of the plugins/themes are in use
  • For each item:
    • Download
    • Extract ZIP
    • Update Plugin/Theme
  • Disable Maintenance mode

The Extracting of the ZIP and Updating the plugin/theme is the expensive part of the update process normally.

Last edited 11 years ago by dd32 (previous) (diff)

#3 @chriscct7
9 years ago

  • Keywords needs-patch added

#4 @johnbillion
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #14393.

Note: See TracTickets for help on using tickets.