mmap() failed: [12] Cannot allocate memory.

Avatar
  • Answered
I have Laravel 5.5 hosted in Inmotion and am trying to use the composer update/composer require command via SSH. When I run any of these command, I get an error: mmap() failed: [12] Cannot allocate memory.
Following a support post in this forum, I've changed PHP versions to 7.1 in both Cpanel and CLI but error is still the same
Avatar
Arn
Hello Ascentnepal, Sorry for the problems with Laravel 5.5 and the Cannot allocate memory error. I researched this issue and I'm finding several possible solutions. Check out these forum posts: Problems with memory using Composer and PHP Composer update “cannot allocate memory” error (using Laravel 4). The second post lists Laravel 4, but may still provide a viable answer using the creation of a swap file. If either of these options do not help, then I recommend posting in the Laravel community site for additional assistance. They would be the best option to help you resolve your memory allocation issues. The issue is very broad and requires that you isolate the cause in order to determine how to find its resolution. If you have any further questions, please let us know. Kindest regards, Arnel C.