0

My Siteground shared hosting plan does not allow me to use composer (memory limit). How can I fix this issue? is there a way to manually update it without composer? or how can I disable this module? Thanks!

1 exception(s): Exception #0 (Magento\Framework\Exception\LocalizedException): Please update your modules: Run "composer install" from the Magento root directory. The following modules are outdated: Magefan_Community db schema version: defined in codebase - 2.0.2, currently installed - 2.0.3 Magefan_Community db data version: defined in codebase - 2.0.2, currently installed - 2.0.3

========================================================================

mmap() failed: [12] Cannot allocate memory

Fatal error: Out of memory (allocated 844111872) (tried to allocate 20480 bytes) in phar:///usr/local/bin/composer.phar/src/Composer/DependencyResolver/Rule.php on line 76
  • what is command that you want to run ? – Ajwad Taqvi Dec 10 '18 at 20:49
  • trying to run "composer install" and received the above |Fatal error: Out of memory ...." thanks! – Kris Wen Dec 10 '18 at 20:51
0
Did you ever manage to resolve this? I am having the same issue. We recently signed up to Siteground and are trying to upgrade our website from Magento 2.2.5 to Magento 2.3.

When trying to run Composer Update I have the exact same problem.

I tried running commands such as 'php -d memory_limit=512M /usr/local/bin/composer update' but no luck what so ever.

Any help with this would be so much appreciated!

I had to cloned the magento site to the local computer and run it using xampp, and run those composer commands and upload the changes back to siteground.

0

Try this:

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

Let me know if not solved!

  • It required me to run "composer update" before "composer Install" and it's having the same memory error: – Kris Wen Dec 10 '18 at 21:58
  • mmap() failed: [12] Cannot allocate memory mmap() failed: [12] Cannot allocate memory mmap() failed: [12] Cannot allocate memory Fatal error: Out of memory (allocated 839917568) (tried to allocate 33554440 bytes) in phar:///usr/local/bin/composer.phar/src/Composer/DependencyResolver/RuleSet.php on line 77 – Kris Wen Dec 10 '18 at 21:58
  • You are still setting a maximum amount of memory php can use and the command you run still needs more. Not an ideal solution but the easiest way is to use php -d memory_limit=-1 /usr/local/bin/composer update || install. Using -1 tells php to use no memory limit so it will run until complete or the operating system runs out of memory and kills process. This was is better than guessing about how much maximum memory to allocate. – James Cowie Dec 10 '18 at 23:09
  • Hi, i also tried using the -1, but the hosting provider is limit it to 768M maximum for php memory limit. Is there any other way to get around it? – Kris Wen Dec 10 '18 at 23:22

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.