Composer update command - returns cannot allocate memory
I have a project that uses composer, at the user level, I can't run the composer command.
In the PHP version I have already increased the memory to 4096M, but it still returns the same error.
composer update
Loading composer repositories with package information
mmap() failed: [12] Cannot allocate memory
mmap() failed: [12] Cannot allocate memory
Fatal error: Out of memory (allocated 182976512) (tried to allocate 5242880 bytes) in phar:///opt/cpanel/composer/bin/composer/src/Composer/DependencyResolver/DefaultPolicy.php on line 89
Can someone help me solve this?
-
Hey there! Is the user possibly in CageFS on a CloudLinux machine? That tool could be limiting the amount of RAM for the user in general that is needed to process this request.
If so, could you try pulling the user out of CageFS and then see if you get a different result from that command?
0 -
I'm using immunify360 as a firewall along with csf, the web server is LiteSpeed, I temporarily solved it by disabling Fork Bomb.
But I don't know if this is correct... I disabled Fork Bomb, ran the command and reactivated it.
Is there a safer way to do this permanently?
0 -
No, that's a correct action to take - if that protection is enabled it will keep shell from executing large commands, so disabling it is the best option.
1 -
thank you very much
0 -
You're very welcome!
0
Please sign in to leave a comment.
Comments
5 comments