0

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 ??

1

you can try something like this too:

php -d memory_limit=512M /usr/local/bin/composer update

Where /usr/local/bin/composer is the path where your composer is installed. And 512M is yor memory limit.

  • php -d memory_limit=-1M /opt/cpanel/composer/bin/composer update instamojo/instamojo-magento-2 i tried again, and got message "Killed – Amul Bhatia Aug 13 '18 at 18:30
0

If composer runs out of memory, you'll have to increase memory limit for php , you can locate your php.ini by executing following command in your ssh terminal ;

 php -i | grep  "Configuration File (php.ini) Path"

Open up the ini file , search and increase value for memory_limit until error resolves or you can set value to -1 to remove memory limit.

Note that you must restart apache/nginx service after your change php configuration.

EDIT :

Try following command ;

php -r "readfile('getcomposer.org/installer');"; | php
  • but its have shared hosting, cant restart server .. any idea ? – Amul Bhatia Aug 13 '18 at 17:46
  • check edit and see if it works for you. – Vivek Kumar Aug 13 '18 at 18:04
  • sorry, i just copied that command.. nothing worked error syntax error near unexpected token `|' – Amul Bhatia Aug 13 '18 at 18:09
  • check out this question - stackoverflow.com/questions/36107400/… – Vivek Kumar Aug 13 '18 at 18:11
  • php -d memory_limit=-1M /opt/cpanel/composer/bin/composer update instamojo/instamojo-magento-2 i tried again, and got message "Killed" – Amul Bhatia Aug 13 '18 at 18:19
0

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
0

Try below command:

php -d memory_limit=4G composer update

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.