Increasing the vm.max_map_count parameter on a Plesk for Linux server is required for applications (such as Elasticsearch) that need a higher number of memory map areas than the default limit.
Follow the steps:
- Connect to the Server
- Access your server via SSH.
- If you do not have SSH access, contact your server administrator.
- Increase vm.max_map_count Temporarily
Run the following command as root or using sudo to increase the value until the next reboot:sysctl -w vm.max_map_count=655350
Alternatively, you can use:
sudo sh -c ‘echo 655350 > /proc/sys/vm/max_map_count’
- Make the Change Permanent
To ensure the setting persists after a reboot:- Open the sysctl configuration file:
vi /etc/sysctl.conf
- Add the following line at the end of the file:
vm.max_map_count=655350
- Save and exit the file.
- Open the sysctl configuration file:
- Apply the Changes
Apply the configuration immediately without rebooting:sysctl -p
- Verify the Change
Confirm that the new value has been applied successfully:sysctl vm.max_map_count
Expected output:
vm.max_map_count = 655350
Notes:
- The /etc/sysctl.conf file controls kernel parameters, including the maximum number of memory map areas a process can use.
- The default value is 65536, which may be insufficient for certain applications.
- If your server uses container-based virtualisation, these changes must be applied on the hardware node.
Running into memory limit issues with WordPress and PHP? Explore our guide on How to Increase Your WordPress and PHP Memory Limit for solutions.