PHP memory limit being reached. What command(s) is your deploy script doing?
Laravel 5 deploy
Anyone tried to deploy an application using Laravel 5?
I'm getting a error, something like this: Loading composer repositories with package information Installing dependencies (including require-dev) - Installing nikic/php-parser (0.9.x-dev ef70767) PHP Fatal error: Uncaught exception 'ErrorException' with message 'proc_open(): fork failed - Cannot allocate memory' in phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:983 .....
First try to run composer this way:
php -d memory_limit=-1 /usr/local/bin/composer update
If it works, just add memory_limit=-1 to your php.ini and you should be good.
If it doesn't and your box is a Homestead or Ubuntu, check if you have swap memory in your server:
free -h
And you should see something like:
Swap: 2.0G 93M 1.9G
If you don't, you better add some to your box:
sudo dd if=/dev/zero of=/swapfile bs=1024 count=2048k
sudo mkswap /swapfile
sudo swapon -a
echo "/swapfile none swap sw 0 0" | sudo tee -a /etc/fstab
echo 10 | sudo tee /proc/sys/vm/swappiness
echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf
chown root:root /swapfile
sudo chmod 0600 /swapfile
And reboot it.
Please or to participate in this conversation.