PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted

Written by SarahS

11th December 2020

Sometimes you’ll try and install something using composer and you may get a message like this:

PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52

The quickest and simplest way to get around it is to add COMPOSER_MEMORY_LIMIT=-1 in front so a sample command would be:

COMPOSER_MEMORY_LIMIT=-1 composer require livewire/livewire laravel-frontend-presets/tall

If this post helped you or if you have any questions please leave me a comment below:

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

You May Also Like…

How to Check PHP Version

How to Check PHP Version

In order to see which PHP version your server is running you can type [PHP -v] via SSH. Alternatively you can create a...