skip to Main Content

I have VPS using CentOs 7 with CyberPanel and when I try to use composer install I get this error

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

Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 268435456 bytes) in phar:///usr/bin/composer/src/Composer/DependencyResolver/Solver.php on line 223

Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.

Screenshots

one

two

Any idea?

2

Answers


  1. Chosen as BEST ANSWER

    Solved

    I used this command and my composer start to run

    which composer
    

    To find my composer path, and then

    php -d memory_limit=-1 /user/bin/composer update
    

  2. Find the correct php.ini for your PHP CLI SAPI with the following command:

    php -i | grep 'ini'
    

    Add memory_limit = -1 to this file with a text editor.

    You can aswell increase the memory limit for one command with:

    COMPOSER_MEMORY_LIMIT=-1 composer update
    

    … or …

    php -d memory_limit=-1 /user/bin/composer update
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search