简体   繁体   中英

Capistrano deployment aborted because of Composer

I've an issue with my cap deployment when the command runs :

/usr/bin/env composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader

It takes few minutes before I receive this error message:

composer stdout: Warning: proc_open(): fork failed - Cannot allocate memory in phar:///usr/local/bin/composer/vendor/symfony/console/Application.php on line 954

composer stderr: Loading composer repositories with package information

The following exception is caused by a lack of memory and not having swap configured

Check https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors for details

If i'm going to the current release of project on the server, and I remove vendor folder, then I execute "composer install", it works.

Locally, on my computer, mamp env, I execute this command with a memory limit :

php -dmemory_limit=2G /usr/local/bin/composer install

it works also.

The problem occurs only when I use capistrano deployment.

Any idea ?

For information :

  1. I checked the server, it has 4Go Ram.

  2. Swap is activated.

  3. php memory limit is set -1.

在此处输入图片说明

Thanks,

I just upgraded my config with 6Go RAM. Composer install seems working ... but why does it need so much memory ?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM