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

Large migrations using the install tool can time out #364

Closed
jakecausier opened this issue Oct 14, 2024 · 1 comment · Fixed by statamic/cms#10955
Closed

Large migrations using the install tool can time out #364

jakecausier opened this issue Oct 14, 2024 · 1 comment · Fixed by statamic/cms#10955
Labels
bug Something isn't working

Comments

@jakecausier
Copy link

Bug description

When installing the Eloquent Driver using the php please install:eloquent-driver and checking the options to import the various types of content, the process can timeout after 60 seconds if there is a large number of content items to import.

Some additional factors:

  • The issue happened on our Asset items, importing around 7500+ items
  • The issue does not appear to happen when running the individual import commands such as php please eloquent:import-assets
  • Our assets are stored in Amazon S3 (this may be a contributing factor to the time it takes to import the items)

How to reproduce

  1. Have an asset container with a large number of items stored within it
  2. Install the Eloquent Driver plugin using php please install:eloquent-driver
  3. Check the Assets and Assets Container items to be imported from the selectable list
  4. Wait 60 seconds after the Asset import has begun
  5. Observe the timeout error

Logs

[2024-10-14 12:46:19] local.ERROR: The process "'/opt/homebrew/Cellar/php/8.3.11/bin/php' 'artisan' 'statamic:eloquent:import-assets' '--force' '--only-assets'" exceeded the timeout of 60 seconds. {"exception":"[object] (Illuminate\\Process\\Exceptions\\ProcessTimedOutException(code: 0): The process \"'/opt/homebrew/Cellar/php/8.3.11/bin/php' 'artisan' 'statamic:eloquent:import-assets' '--force' '--only-assets'\" exceeded the timeout of 60 seconds. at /**truncated**/vendor/laravel/framework/src/Illuminate/Process/PendingProcess.php:261)
[stacktrace]
#0 /**truncated**/vendor/laravel/framework/src/Illuminate/Process/Factory.php(326): Illuminate\\Process\\PendingProcess->run(''/opt/homebrew/...', Object(Closure))
#1 /**truncated**/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(355): Illuminate\\Process\\Factory->__call('run', Array)
#2 /**truncated**/vendor/statamic/cms/src/Console/Commands/InstallEloquentDriver.php(629): Illuminate\\Support\\Facades\\Facade::__callStatic('run', Array)
#3 /**truncated**/vendor/statamic/cms/src/Console/Commands/InstallEloquentDriver.php(208): Statamic\\Console\\Commands\\InstallEloquentDriver->runArtisanCommand('statamic:eloque...')
#4 /**truncated**/vendor/laravel/prompts/src/Spinner.php(73): Statamic\\Console\\Commands\\InstallEloquentDriver->Statamic\\Console\\Commands\\{closure}()
#5 /**truncated**/vendor/laravel/prompts/src/helpers.php(134): Laravel\\Prompts\\Spinner->spin(Object(Closure))
#6 /**truncated**/vendor/statamic/cms/src/Console/Commands/InstallEloquentDriver.php(207): Laravel\\Prompts\\spin(Object(Closure), 'Importing exist...')
#7 /**truncated**/vendor/statamic/cms/src/Console/Commands/InstallEloquentDriver.php(83): Statamic\\Console\\Commands\\InstallEloquentDriver->migrateAssets()
#8 /**truncated**/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Statamic\\Console\\Commands\\InstallEloquentDriver->handle()
#9 /**truncated**/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#10 /**truncated**/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#11 /**truncated**/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#12 /**truncated**/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#13 /**truncated**/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\\Container\\Container->call(Array)
#14 /**truncated**/vendor/symfony/console/Command/Command.php(326): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#15 /**truncated**/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#16 /**truncated**/vendor/statamic/cms/src/Console/EnhancesCommands.php(15): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#17 /**truncated**/vendor/symfony/console/Application.php(1096): Statamic\\Console\\Commands\\InstallEloquentDriver->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#18 /**truncated**/vendor/symfony/console/Application.php(324): Symfony\\Component\\Console\\Application->doRunCommand(Object(Statamic\\Console\\Commands\\InstallEloquentDriver), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#19 /**truncated**/vendor/symfony/console/Application.php(175): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#20 /**truncated**/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#21 /**truncated**/please(35): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#22 {main}

Environment

Environment
Application Name: **truncated**
Laravel Version: 10.48.22
PHP Version: 8.3.11
Composer Version: 2.2.3
Environment: local
Debug Mode: ENABLED
URL: **truncated**
Maintenance Mode: OFF

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: NOT CACHED

Drivers
Broadcasting: log
Cache: redis
Database: mysql
Logs: stack / single, bugsnag
Mail: smtp
Queue: redis
Scout: algolia
Session: redis

Statamic
Addons: 3
Sites: 3 (English, Japanese, Chinese)
Stache Watcher: Disabled
Static Caching: Disabled
Version: 5.25.0 PRO

Statamic Addons
statamic/eloquent-driver: 4.15.2
statamic/seo-pro: 6.1.2

Statamic Eloquent Driver
Asset Containers: eloquent
Assets: eloquent
Blueprints: eloquent
Collection Trees: eloquent
Collections: eloquent
Entries: eloquent
Forms: eloquent
Global Sets: eloquent
Global Variables: eloquent
Navigation Trees: eloquent
Navigations: eloquent
Revisions: file
Sites: eloquent
Taxonomies: eloquent
Terms: eloquent
Tokens: eloquent

Additional details

No response

@duncanmcclean
Copy link
Member

Thanks for reporting!

This issue will be fixed in the next version of Statamic for future sites.

You can workaround this issue for now by manually running the import command: php please statamic:eloquent:import-assets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants