Repository navigation
fix: bound how long admin screens wait on remote requests - #576
Open
TallblokeUK wants to merge 4 commits into
Open
TallblokeUK wants to merge 4 commits into
TallblokeUK wants to merge 4 commits into
Conversation
…into fix/remote-request-timeouts/core # Conflicts: # CHANGELOG.md
…into fix/remote-request-timeouts/core # Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Towards #471.
Five outbound requests stated no limit of their own and so fell back to WordPress's default: the welcome document, three public cloud API calls, and the list of installable versions. Each is made while an admin screen renders, so a slow or unreachable service holds the screen for as long as that default allows.
Each now names its own limit, following the pattern already used for search and feedback: the welcome document gives up soonest, as nothing on the screen depends on it, and requests the reader is actually waiting on are allowed longer.
What this does not do
The reported symptom is an admin screen that stays stuck, and this does not by itself explain that, so the issue should stay open. Two things found while looking, neither changed here:
Welcome_Clientfetches over the network from its constructor, andBootstrap_Adminconstructs it on every admin page load, so the fetch is on the path of every admin screen rather than the one that displays it. The result is cached for two days whether it succeeded or not, which bounds how often that is paid but also means a momentary outage hides the content for two days.Version_Switch::get_available_versions()returns early on failure without caching anything, so every call during an outage makes the request again.Verification
lint:phppass.