mmap() failed: [12] Cannot allocate memory
mmap() failed: [12] Cannot allocate memory
PHP Fatal error: Out of memory (allocated 645931008) (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleSetGenerator.php on line 129
I have tried updating the /etc/.../php.ini file but using -1 (infinity) and 2G does not have any effect.
Magento requires a minimum of 2GB to run without these types of errors. Assuming your server has 2GB available, you still need to update the .htaccess file in the Magento root directory. The default file is set to 756MB (no idea why).