KVM VM: ERROR: unable to allocate 1168 bytes in shared memory: Cannot allocate memory: Cannot allocate memory (12)


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » CustomBuild » ./build php » php-FPM

KVM VM: ERROR: unable to allocate 1168 bytes in shared memory: Cannot allocate memory: Cannot allocate memory (12)Last Modified: Sep 25, 2015, 6:12 pm
Reported on a KVM Virtual Machine where there was plenty of free ram:

Starting php-fpm54: [24-Sep-2015 01:58:53] ERROR: unable to allocate 1168 bytes in shared memory: Cannot allocate memory: Cannot allocate memory (12)

where the solution was to increase the vm.max_map_count.

Check the current value:

sysctl vm.max_map_count

which might output

vm.max_map_count = 65530

which can be changed to a higher value, eg:

sysctl -w vm.max_map_count=655300



which would let the system access the ram is has allocated.

© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST