Skip to content

Conversation

@bcotrim
Copy link
Contributor

@bcotrim bcotrim commented Oct 22, 2025

Related issues

Proposed Changes

  • Replaced hard CURLOPT_TIMEOUT (30s) with low-speed timeout to allow large plugin downloads
  • Set CURLOPT_LOW_SPEED_LIMIT to 1KB/s and CURLOPT_LOW_SPEED_TIME to 30s in the HTTP request timeout mu-plugin
  • Kept overall timeout at 300s timeout
  • Updated both src/lib/wordpress-provider/playground-cli/mu-plugins.ts and vendor/wp-now/src/wp-now.ts
  • This allows large downloads (like Jetpack at 33MB) to complete while still failing fast on stalled connections

Testing Instructions

  • Install Network Link Conditioner (from Apple's Additional Tools for Xcode)
  • Set throttling to a slow profile (e.g., "3G" or "Edge")
  • In Studio, navigate to /wp-admin/plugin-install.php
  • Try installing Jetpack plugin (33MB)
  • Expected: Should complete successfully even on throttled connection (may take several minutes)
  • With the old 30s timeout, this would fail with "Operation timed out after 30014 milliseconds"
  • Optionally verify with normal internet by turning off Network Link Conditioner and installing Jetpack - should complete quickly without any timeout issues

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@bcotrim bcotrim self-assigned this Oct 22, 2025
@bcotrim bcotrim requested a review from a team October 22, 2025 12:02
@github-actions
Copy link
Contributor

📊 Performance Test Results

Comparing 301c1f8 vs trunk

site-editor

Metric trunk 301c1f8 Diff Change
load 11376.00 ms 8926.00 ms -2450.00 ms 🟢 -21.5%

site-startup

Metric trunk 301c1f8 Diff Change
siteCreation 12074.00 ms 11050.00 ms -1024.00 ms 🟢 -8.5%
siteStartup 3948.00 ms 3929.00 ms -19.00 ms 🟢 -0.5%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change

Copy link
Contributor

@ivan-ottinger ivan-ottinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! The changes look good and I can confirm they fix the issue when installing Jetpack on DSL speeds. If I tested with slower connection (e.g. 3G or EDGE), it failed as with the current trunk.

Install Network Link Conditioner (from Apple's Additional Tools for Xcode)

This took me a bit longer to figure our where to find the tool so I am linking it here - if anyone else would like to use it:
https://developer.apple.com/download/all/?q=Additional%20Tools

It is bundled inside Additional Tools and I found the tool quite buggy. For instance, my Preferences crashed multiple times and it was necessary to force-close it.

Copy link
Contributor

@epeicher epeicher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @bcotrim for improving this! I have tested it with DSL connection and while it was failing in Production, it has worked using this branch. Changes also LGTM! :shipit:

Speed Production version This branch
Image Image Image

@bcotrim bcotrim merged commit c70246d into trunk Oct 22, 2025
13 checks passed
@bcotrim bcotrim deleted the stu-858-downloading-some-plugins-fails-operation-timed-out branch October 22, 2025 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants