Magento 2 Composer – How to Fix Out of Memory Issues

composermagento2PHPserver-setupssh

I am trying to install instamojo payment gateway to my magento2 store, as per the instructions givne by instamojo page https://docs.instamojo.com/page/instamojo-integeration-for-magento-2

i tried the command using CLI (ssh) at my ubuntu host

composer update instamojo/instamojo-magento-2

Loading composer repositories with package information

Updating dependencies (including require-dev)

Killed

I searched Google and found that , it happens because composer runs out of memory, but how could i increase the memory at remote server (I am running the website on live server at Godaddy)

Is there any other way of doing this ??

Best Answer

Try this with more memory

php -d memory_limit=4G /usr/local/bin/composer update

OR

php -d memory_limit=-1 /usr/local/bin/composer update
Related Topic