Composer Update Failed -- Out of Memory

Composer Update failed -- out of memory

Solved by deleting the whole vendor folder, and then doing the composer update again, and it works... somehow. I don't even understand :v

composer update out of memory no matter what I do

I discovered that the problem was caused by me having MB or GB in php.ini instead of just M after the number... so I guess I forgot that bit of unintuitive formatting that PHP has for its memory limit. Silly me.

Composer require runs out of memory. PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted

To get the current memory_limit value, run:

php -r "echo ini_get('memory_limit').PHP_EOL;"

Try increasing the limit in your php.ini file (ex. /etc/php5/cli/php.ini for Debian-like systems):

; Use -1 for unlimited or define an explicit value like 2G
memory_limit = -1

Or, you can increase the limit with a command-line argument:

php -d memory_limit=-1 composer.phar require hwi/oauth-bundle php-http/guzzle6-adapter php-http/httplug-bundle

To get loaded php.ini files location try:

php --ini

Another quick solution:

php composer.phar COMPOSER_MEMORY_LIMIT=-1 require hwi/oauth-bundle php-http/guzzle6-adapter php-http/httplug-bundle

Or just:

COMPOSER_MEMORY_LIMIT=-1 composer require hwi/oauth-bundle php-http/guzzle6-adapter php-http/httplug-bundle

Out of memory error in 'Composer update' command inside docker container in Aws ec2 instance

Run composer update in your local environment, then commit composer.json and composer.lock to your code repository, pull the changes in your ec2 instance and run composer install.

Commonly, low resource servers don't have enough RAM to run composer update. You're better off doing it in your local environment, and only using composer install on your server.

PHP Composer update cannot allocate memory error (using Laravel 4)

A bit old but just in case someone new is looking for a solution, updating your PHP version can fix the issue.

Also you should be committing your composer.lock file and doing a composer install on a production environment which is less resource intensive.

More details here:
https://github.com/composer/composer/issues/1898#issuecomment-23453850

composer runs out of memory, cannot work around

Thanks to matzeri, the 64-bit cygwin seems to have done the trick. Oddly, though, composer on 32-bit cygwin always ran out at only 64MB.

Composer require runs out of memory. PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted Voyager

Looks like you are using xampp.
you can try to change the memory_limit in php.ini.
Sample Image

Find this:

;memory_limit=512M 

Change to :

memory_limit =-1

Then restart the Apache from xampp



Related Topics



Leave a reply



Submit