Increase server start inactivity timeout to 300s for plugin-heavy sites (STU-1622) - #3880
Draft
agent-sandbox-automattic[bot] wants to merge 1 commit into
Draft
Increase server start inactivity timeout to 300s for plugin-heavy sites (STU-1622)#3880agent-sandbox-automattic[bot] wants to merge 1 commit into
agent-sandbox-automattic[bot] wants to merge 1 commit into
Conversation
…-heavy sites Sites with many active plugins (WooCommerce, AIOSEO, Wordfence, Elementor, etc.) can take longer than 120s to bootstrap WordPress on SQLite during a Studio Pull. Increase PLAYGROUND_CLI_INACTIVITY_TIMEOUT from 2 to 5 minutes so these sites have enough time to initialize before the server start times out. Also adds a helpful hint to the timeout error message for start-server to guide users that plugin load time may be the cause. Fixes STU-1622. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Related issues
Fixes STU-1622: Studio Pull on Windows: 120s server start timeout on plugin-heavy sites
How AI was used in this PR
AI was used to investigate the root cause, identify the relevant constants, and implement the fix.
Proposed Changes
Sites with many active plugins (WooCommerce, AIOSEO, Wordfence, Smart Slider 3, Elementor, EWWW, MonsterInsights, etc.) need more than 120 seconds to bootstrap WordPress on SQLite. The current hardcoded 120s inactivity timeout caused Studio Pull to consistently fail at the server-start step even though the SQL import and search-replace completed successfully.
This PR increases
PLAYGROUND_CLI_INACTIVITY_TIMEOUTfrom 2 minutes (120s) to 5 minutes (300s). The 10-minute absolute maximum (PLAYGROUND_CLI_MAX_TIMEOUT) is unchanged, so there is still a ceiling on how long any single operation can take.Additionally, when a
start-servermessage times out, the error now includes a hint: "Sites with many plugins may need more time to initialize." This helps users understand the cause without digging through logs.Testing Instructions
PLAYGROUND_CLI_INACTIVITY_TIMEOUTbelow actual startup time and confirm the error reads "No activity for Xs. Sites with many plugins may need more time to initialize."Pre-merge Checklist
PLAYGROUND_CLI_MAX_TIMEOUT(10 min absolute maximum) is unchanged — still guards against infinite hangsstop-serverpath usesmaxTotalElapsedTime: 5000(5s) which takes precedence over the inactivity timeout, so graceful stop behaviour is unaffectedLinear: STU-1622