composer limit memory code example

Example 1: composer allowed memory size

COMPOSER_MEMORY_LIMIT=-1 composer require owen-it/laravel-auditing

Example 2: composer memory limit

php -d memory_limit=512M /usr/local/bin/composer update

Example 3: composer update withou memory limit

php -d memory_limit=-1 path_to_composer.phar_that_threw_the_error update

Example 4: composer allowed memory size

export COMPOSER_MEMORY_LIMIT=-1

Example 5: Composer Memory

/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
/sbin/mkswap /var/swap.1
/sbin/swapon /var/swap.1

Tags:

Misc Example