How to increase vm.max_map_count on a Plesk for Linux server

June 24, 2024 / Plesk

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:

  1. Connect to the Server
    1. Access your server via SSH.
    2. If you do not have SSH access, contact your server administrator.
  2. 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’
  3. Make the Change Permanent
    To ensure the setting persists after a reboot:

    1. Open the sysctl configuration file:
      vi /etc/sysctl.conf
    2. Add the following line at the end of the file:
      vm.max_map_count=655350
    3. Save and exit the file.
  4. Apply the Changes
    Apply the configuration immediately without rebooting:

    sysctl -p
  5. 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.

Spread the love