Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playground plugin: exceeded max execution time #222

Open
bph opened this issue Apr 9, 2024 · 3 comments
Open

Playground plugin: exceeded max execution time #222

bph opened this issue Apr 9, 2024 · 3 comments
Labels
Enhancement New feature or request Playground plugin

Comments

@bph
Copy link
Contributor

bph commented Apr 9, 2024

Error when executing the blueprint step #1 ({"step":"runSql","sql":{"resource":"vfs","path":"/wordpress/wp-content/database/database.sql"}}) : Could not read "/wordpress/wp-content/database/database.sql": There is no such file or directory OR the parent directory does not exist.

I installed https://wordpress.org/plugins/playground/ (v.0.1.1) on icodeforapurpose.com site and attempted to create a sandbox site.

As I wasn't able to catch the Browser console error before it disappeared, I did a screen recording.

Screen.Recording.2024-04-08.at.19.34.08.mov

If there is anything, I am missing let me know.

The site is hosted on Digital Ocean via SpinupWP.

@bph
Copy link
Contributor Author

bph commented Apr 9, 2024

debug.log

[08-Apr-2024 17:26:57 UTC] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /sites/icodeforapurpose.com/files/wp-content/plugins/playground/vendor/maennchen/zipstream-php/src/Time.php on line 29

[08-Apr-2024 17:26:57 UTC] PHP Notice: Function is_embed was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /sites/icodeforapurpose.com/files/wp-includes/functions.php on line 6078

[08-Apr-2024 17:26:57 UTC] PHP Notice: Function is_search was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /sites/icodeforapurpose.com/files/wp-includes/functions.php on line 6078

--
edited for brevity

@bgrgicak
Copy link
Collaborator

bgrgicak commented Apr 9, 2024

[08-Apr-2024 17:33:49 UTC] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /sites/icodeforapurpose.com/files/wp-content/plugins/playground/vendor/maennchen/zipstream-php/src/File.php on line 339

Looks like this is a performance issue. We will need to create a test site with a larger amount of data and see when it breaks.
Longterm we should consider lazy loading static data and not bundling it with the ZIP.

@bgrgicak bgrgicak added Playground plugin Enhancement New feature or request labels Apr 9, 2024
@bgrgicak bgrgicak changed the title Sandbox wouldn't load. Missing database.sql Playground plugin: exceeded max execution time Apr 10, 2024
@adamziel
Copy link
Collaborator

What could help:

  • Increasing max execution time (easy).
  • Switching to a custom zip encoder like the one shipped in https://github.com/WordPress/blueprints-library/, zip-stream doesn't seem highly optimized (medium).
  • Split the process over multiple requests (difficult).

Overall, this is a Site Transfer Protocol problem. Once we prioritize that project, this issue will get resolved "for free".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Playground plugin
Projects
None yet
Development

No branches or pull requests

3 participants