Symptoms
On servers with free memory and no limits in place, errors similar to the following can be generated:
[crit] Memory allocation failed, aborting process.
(12)Cannot allocate memory: AH00159: fork: Unable to fork new process
Description
On servers with the sysctl variable vm.overcommit_memory
set to 2, overcommiting of RAM is disallowed. This sets the server to be very conservative with memory-allocation. The setting can be checked with the following command:
# sysctl -a | grep overcommit
vm.overcommit_kbytes = 0
vm.overcommit_memory = 2
vm.overcommit_ratio = 50
More information on these settings can be found in the Linux Kernel documentation.
Workaround
To correct this, change the value of vm.overcommit_memory
to "0" (default) in /etc/sysctl.conf
. Run the following command to reload the values from the file:
sysctl -p
Comments
0 comments
Article is closed for comments.