Skip to content

Max execution time of 60 seconds exceeded in CLI #2461

Closed
@kassner

Description

@kassner

Hi,

I got this error when running php bin/magento setup:static-content:deploy from the CLI. I have to run with -d max_executin_time=0 to avoid the error. This should not happen since PHP CLI has max_execution_time with 0 as default.

IMHO, we shouldn't define the max_execution_time or call set_time_limit within the code, but let the php.ini values kick in or at least define it in static.php.

root@bad6c70cf905:/var/www# sudo -H -u www-data /usr/bin/php bin/magento setup:static-content:deploy
Requested languages: en_US
=== frontend -> Magento/luma -> en_US ===
........................PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /var/www/vendor/oyejorge/less.php/lib/Less/Parser.php on line 1539
PHP Stack trace:
PHP   1. {main}() /var/www/bin/magento:0
PHP   2. Symfony\Component\Console\Application->run() /var/www/bin/magento:25
PHP   3. Magento\Framework\Console\Cli->doRun() /var/www/vendor/symfony/console/Symfony/Component/Console/Application.php:126
PHP   4. Symfony\Component\Console\Application->doRun() /var/www/lib/internal/Magento/Framework/Console/Cli.php:49
PHP   5. Symfony\Component\Console\Application->doRunCommand() /var/www/vendor/symfony/console/Symfony/Component/Console/Application.php:195
PHP   6. Symfony\Component\Console\Command\Command->run() /var/www/vendor/symfony/console/Symfony/Component/Console/Application.php:874
PHP   7. Magento\Deploy\Console\Command\DeployStaticContentCommand->execute() /var/www/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
PHP   8. Magento\Deploy\Model\Deployer->deploy() /var/www/app/code/Magento/Deploy/Console/Command/DeployStaticContentCommand.php:120
PHP   9. Magento\Deploy\Model\Deployer->deployFile() /var/www/app/code/Magento/Deploy/Model/Deployer.php:181
PHP  10. Magento\Framework\App\View\Asset\Publisher->publish() /var/www/app/code/Magento/Deploy/Model/Deployer.php:340
PHP  11. Magento\Framework\App\View\Asset\Publisher->publishAsset() /var/www/lib/internal/Magento/Framework/App/View/Asset/Publisher.php:50
PHP  12. Magento\Framework\View\Asset\File->getSourceFile() /var/www/lib/internal/Magento/Framework/App/View/Asset/Publisher.php:63
PHP  13. Magento\Framework\View\Asset\Source->getFile() /var/www/lib/internal/Magento/Framework/View/Asset/File.php:150
PHP  14. Magento\Framework\View\Asset\Source->preProcess() /var/www/lib/internal/Magento/Framework/View/Asset/Source.php:86
PHP  15. Magento\Framework\View\Asset\PreProcessor\Pool->process() /var/www/lib/internal/Magento/Framework/View/Asset/Source.php:128
PHP  16. Magento\Developer\Model\View\Asset\PreProcessor\PreprocessorStrategy->process() /var/www/lib/internal/Magento/Framework/View/Asset/PreProcessor/Pool.php:74
PHP  17. Magento\Framework\View\Asset\PreProcessor\AlternativeSource->process() /var/www/app/code/Magento/Developer/Model/View/Asset/PreProcessor/PreprocessorStrategy.php:62
PHP  18. Magento\Framework\View\Asset\PreProcessor\AlternativeSource->processContent() /var/www/lib/internal/Magento/Framework/View/Asset/PreProcessor/AlternativeSource.php:115
PHP  19. Magento\Framework\Css\PreProcessor\Adapter\Less\Processor->processContent() /var/www/lib/internal/Magento/Framework/View/Asset/PreProcessor/AlternativeSource.php:155
PHP  20. Less_Parser->getCss() /var/www/lib/internal/Magento/Framework/Css/PreProcessor/Adapter/Less/Processor.php:86
PHP  21. Less_Tree_Ruleset->compile() /var/www/vendor/oyejorge/less.php/lib/Less/Parser.php:187
PHP  22. Less_Tree_Ruleset->PrepareRuleset() /var/www/vendor/oyejorge/less.php/lib/Less/Tree/Ruleset.php:70
PHP  23. Less_Tree_Ruleset->evalImports() /var/www/vendor/oyejorge/less.php/lib/Less/Tree/Ruleset.php:235
PHP  24. Less_Tree_Import->compile() /var/www/vendor/oyejorge/less.php/lib/Less/Tree/Ruleset.php:248
PHP  25. Less_Tree_Import->ParseImport() /var/www/vendor/oyejorge/less.php/lib/Less/Tree/Import.php:193
PHP  26. Less_Tree_Ruleset->evalImports() /var/www/vendor/oyejorge/less.php/lib/Less/Tree/Import.php:273
PHP  27. Less_Tree_Import->compile() /var/www/vendor/oyejorge/less.php/lib/Less/Tree/Ruleset.php:248
PHP  28. Less_Tree_Import->ParseImport() /var/www/vendor/oyejorge/less.php/lib/Less/Tree/Import.php:193
PHP  29. Less_Parser->parseFile() /var/www/vendor/oyejorge/less.php/lib/Less/Tree/Import.php:269
PHP  30. Less_Parser->GetRules() /var/www/vendor/oyejorge/less.php/lib/Less/Parser.php:343
PHP  31. Less_Parser->parsePrimary() /var/www/vendor/oyejorge/less.php/lib/Less/Parser.php:532
PHP  32. Less_Parser->MatchFuncs() /var/www/vendor/oyejorge/less.php/lib/Less/Parser.php:860
PHP  33. Less_Parser->parseMixinDefinition() /var/www/vendor/oyejorge/less.php/lib/Less/Parser.php:710

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions