Question
How to increase vm.max_map_count in a Plesk for Linux server?
Answer
Note: if direct SSH access to the server is not possible, contact the server administrator for further assistance.
Note: if container virtualization is used, these steps should be applied on a hardware node side.
-
Connect to the server via SSH;
-
increase the default value of vm.max_map_count parameter. An example of how to do that is shown below:
# sysctl -w vm.max_map_count=655300
vm.max_map_count = 655300Or:
# echo 655350 > /proc/sys/vm/max_map_count
-
To change it permanently edit
/etc/sysctl.conf
with a text editor and add the following parameter with the new value. For example:vm.max_map_count=655350
-
Run the command to immediately apply the changes made in
/etc/sysctl.conf
:# sysctl -p
Additional information
The file /etc/sysctl.conf
contains the maximum number of memory map areas a process may have. Memory map areas are used as a side-effect of calling malloc, directly by mmap
and mprotect
, and also when loading shared libraries.
While most applications need less than a thousand maps, certain programs, particularly malloc debuggers, may consume lots of them, e.g. up to one or two maps per allocation.
The default value is 65536.