WordPress.org

Make WordPress Core

Opened 6 months ago

Last modified 2 months ago

#25788 new enhancement

Increase timeout for `plugins/update-check` API request

Reported by: johnbillion Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Upgrade/Install Keywords: has-patch 2nd-opinion
Focuses: Cc:

Description

On my various local test installs I have a single directory rammed full of plugins that is shared between installs. This directory often has over 100 plugins in it, and this often causes the plugin update check to time out (due to the number of plugins that are being checked I presume).

We should increase the timeout for the api.wordpress.org/plugins/update-check requests. We could increase it based on the number of plugins being checked. For example, count( $plugins ) / 10 might be a good timeout, meaning an increase of one second for every ten plugins on the site (with the current three seconds as a minimum).

Thoughts?

Attachments (1)

25788.diff (1.3 KB) - added by dd32 5 months ago.

Download all attachments as: .zip

Change History (6)

comment:2 dd326 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 3.8

Basing the timeout on the number of plugins seems like a decent idea to me.

Not completing the request during a pageload is incredibly annoying (as you know there's an update, but it's timing out) and if an extra second can be added for a large number of plugins (for a page that is already slow from that number of plugins) then it seems worth it.

On the other hand, this does mean an extra second (or two) until the request times out in the event the server has poor connectivity.

Moving to 3.8 pending discussion

dd325 months ago

comment:3 dd325 months ago

  • Keywords has-patch 2nd-opinion added; needs-patch removed

Still on the fence, but can't do any harm. Any objections?

comment:4 dd325 months ago

  • Milestone changed from 3.8 to Future Release

comment:5 SergeyBiryukov2 months ago

#27091 was marked as a duplicate.

Note: See TracTickets for help on using tickets.