运行php工匠超时

时间:2016-05-27 15:44:35

标签: exception timeout composer-php artisan laravel-4.2

我已经继承了Laravel 4.2项目并正在进行一些清理。

当我运行php artisan时,我明白了:

[Symfony\Component\Process\Exception\ProcessTimedOutException] 
The process "php artisan clear-compiled" exceeded the timeout of 300 seconds.

我试图增加超时,但最终还是会抛出相同的异常。

当我尝试在本地和我的VM(Homestead)中运行任何和所有artisan命令时,会发生这种情况。

运行composer install -o -vvv在超时发生后显示以下堆栈跟踪(在php artisan clear-compiled期间结束时):

Exception trace:
 () at phar:///usr/local/bin/composer.phar/vendor/symfony/process/Process.php:1190
 Symfony\Component\Process\Process->checkTimeout() at phar:///usr/local/bin/composer.phar/vendor/symfony/process/Process.php:361
 Symfony\Component\Process\Process->wait() at phar:///usr/local/bin/composer.phar/vendor/symfony/process/Process.php:203
 Symfony\Component\Process\Process->run() at phar:///usr/local/bin/composer.phar/src/Composer/Util/ProcessExecutor.php:68
 Composer\Util\ProcessExecutor->execute() at phar:///usr/local/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:223
 Composer\EventDispatcher\EventDispatcher->doDispatch() at phar:///usr/local/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:95
 Composer\EventDispatcher\EventDispatcher->dispatchScript() at phar:///usr/local/bin/composer.phar/src/Composer/Installer.php:296
 Composer\Installer->run() at phar:///usr/local/bin/composer.phar/src/Composer/Command/UpdateCommand.php:172
 Composer\Command\UpdateCommand->execute() at phar:///usr/local/bin/composer.phar/vendor/symfony/console/Command/Command.php:259
 Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer.phar/vendor/symfony/console/Application.php:844
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer.phar/vendor/symfony/console/Application.php:192
 Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer.phar/src/Composer/Console/Application.php:221
 Composer\Console\Application->doRun() at phar:///usr/local/bin/composer.phar/vendor/symfony/console/Application.php:123
 Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer.phar/src/Composer/Console/Application.php:101
 Composer\Console\Application->run() at phar:///usr/local/bin/composer.phar/bin/composer:43
 require() at /usr/local/bin/composer.phar:24

任何可能导致此问题的想法?我所看到的唯一信息是增加Composer的超时时间,但到目前为止这对我来说还不起作用。

1 个答案:

答案 0 :(得分:0)

试试这个

php artisan something:test --timeout=0

如果这不起作用,请尝试删除供应商文件夹并运行

composer self-updatecomposer update