2

Whenever I try to install a new laravel project, I receive the following error:

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:990

Does anyone have any idea why this error may be occurring, I'm running the server on nginx.

If any other details may be required, list them as a comment and i'll happily edit + update the post, thank you.

samayres1992
  • 127
  • 1
  • 7
  • Are you running this on a small, low-memory server of some sort? I've had issues with large Composer checkouts on AWS's t1.micro instances. – ceejayoz Nov 12 '13 at 20:09
  • @ceejayoz I'm running it on the $5 package by digitalocean.com, I've successfully installed projects with the exact same server a few months ago, so as far as I'm aware I don't think that is the issue. – samayres1992 Nov 12 '13 at 20:21
  • 2
    Depends on the size of the projects and how much RAM is in use for other things. The $5 servers are probably uncomfortably close to the limit. I'd do the `composer install` locally, then SCP the files up, as the initial Laravel checkout pulls a **lot** of stuff. – ceejayoz Nov 12 '13 at 20:22
  • @ceejayoz hm okay, i'll give a try right now and i'll get back to you, thanks for the tip. – samayres1992 Nov 12 '13 at 20:29
  • 1
    Also, this answer: http://stackoverflow.com/questions/18116261/php-composer-update-cannot-allocate-memory-error-using-laravel-4 – jshawl Nov 12 '13 at 20:30

1 Answers1

1

I am using scaleway.com server. I have RAM 2 GB. I also had this problem. I am using this command and this working for me

php -dmemory_limit=1G /usr/local/bin/composer install
Toir
  • 91
  • 1
  • 4