Skip to content

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
trunkfrom
ai/agent/stu-1622-1781767560
Draft

Increase server start inactivity timeout to 300s for plugin-heavy sites (STU-1622)#3880
agent-sandbox-automattic[bot] wants to merge 1 commit into
trunkfrom
ai/agent/stu-1622-1781767560

Conversation

@agent-sandbox-automattic

Copy link
Copy Markdown
Contributor

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_TIMEOUT from 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-server message 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

  • Pull a WordPress.com site with many active plugins (WooCommerce, AIOSEO, Wordfence, Elementor, etc.) on a Windows machine.
  • Confirm the local server starts successfully instead of timing out after 120s.
  • Confirm that a normal (fast) site still starts in under 30s (the new timeout does not affect the happy path).
  • To verify the improved error message: simulate a slow start by temporarily lowering PLAYGROUND_CLI_INACTIVITY_TIMEOUT below 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

  • Change is minimal and focused on the reported issue
  • No new dependencies introduced
  • PLAYGROUND_CLI_MAX_TIMEOUT (10 min absolute maximum) is unchanged — still guards against infinite hangs
  • The stop-server path uses maxTotalElapsedTime: 5000 (5s) which takes precedence over the inactivity timeout, so graceful stop behaviour is unaffected

Linear: STU-1622

This PR was auto-generated by Agent Sandbox. Please review carefully before merging.

…-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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant