![proc_open(): fork failed-can not allocate memory, error on aws ec2 instance while updating/installing some libraries or packages using composer | by Ziaur Rahman | Medium proc_open(): fork failed-can not allocate memory, error on aws ec2 instance while updating/installing some libraries or packages using composer | by Ziaur Rahman | Medium](https://miro.medium.com/v2/resize:fit:1200/1*vuQ9pRJ17YSXmBTHmTskrQ.png)
proc_open(): fork failed-can not allocate memory, error on aws ec2 instance while updating/installing some libraries or packages using composer | by Ziaur Rahman | Medium
![How to fix the «proc_open(): fork failed - Cannot allocate memory» failure on a Composer command? - Magento 2 How to fix the «proc_open(): fork failed - Cannot allocate memory» failure on a Composer command? - Magento 2](https://mage2.pro/uploads/default/original/2X/3/34ec651d1f314477f0c90c4c0abb2adf2bf62f46.png)
How to fix the «proc_open(): fork failed - Cannot allocate memory» failure on a Composer command? - Magento 2
Fatal error: Out of memory (allocated 363331584) (tried to allocate 10343341 bytes) in phar:///opt/cpanel/composer/bin/composer/src/Composer/Repository/ComposerRepository.php on line 339 · Issue #7721 · composer/composer · GitHub
![Increasing the swap file size really solves the «proc_open(): fork failed - Cannot allocate memory» failure Composer issue - Magento 2 Increasing the swap file size really solves the «proc_open(): fork failed - Cannot allocate memory» failure Composer issue - Magento 2](https://mage2.pro/uploads/default/original/2X/d/d54656534cea5c2a07beb6362fff9d800ab79c12.png)