laravel出现proc_open(): fork failed - Cannot allocate memory的错误

laravel会出现proc_open(): fork failed - Cannot allocate memory的报错,具体如下:

[2017-11-15 00:21:02] production.ERROR: exception 'ErrorException' with message 'proc_open(): fork failed - Cannot allocate memory' in /var/www/myproject/vendor/symfony/console/Application.php:958
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'proc_open(): fo...', '/var/www/sain3e...', 958,
Array)
#1 /var/www/myproject/vendor/symfony/console/Application.php(958): proc_open('stty -a | grep ...', Array, NULL, NULL, NULL, Array)
#2 /var/www/myproject/vendor/symfony/console/Application.php(753): Symfony\Component\Console\Application->getSttyColumns()
#3 /var/www/myproject/vendor/symfony/console/Style/SymfonyStyle.php(387): Symfony\Component\Console\Application->getTerminalDimensions()
#4 /var/www/myproject/vendor/symfony/console/Style/SymfonyStyle.php(51): Symfony\Component\Console\Style\SymfonyStyle->getTerminalWidth()
#5 /var/www/myproject/vendor/laravel/framework/src/Illuminate/Console/Command.php(134): Symfony\Component\Console\Style\SymfonyStyle->__construct(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /var/www/myproject/vendor/symfony/console/Application.php(843): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /var/www/myproject/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(122): Symfony\Component\Console\Application
                                                                                                                        32,1          66%
#7 /var/www/myproject/vendor/symfony/console/Application.php(188): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Console\Scheduling\ScheduleRunCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/myproject/vendor/symfony/console/Application.php(119): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/myproject/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/myproject/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 {main} 

不是使用composer的时候出现的,大家有遇到这种情况吗?

阅读 8.1k
1 个回答
/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
/sbin/mkswap /var/swap.1
/sbin/swapon /var/swap.1
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题
宣传栏