Articles in this section

How to configure the MariaDB unit in order to keep it from getting killed by OOM?

kb: how-to

Applicable to:

  • Plesk for Linux

Question

  • How to make MariaDB processes remain alive and avoid getting killed by the Out Of Memory Killer (OOM Killer)?

Answer

1. Log into your server via SSH

2. Open the MariaDB unit for editing by executing the following command:

# systemctl edit mariadb

3. Add the following in the [Service] section:

CONFIG_TEXT: OOMScoreAdjust=-1000

Note: Valid values are integers in the range of -1000 to 1000 for the OOM score. The lower the value, the lower the chance that the process is going to be killed by the OOM Killer.

4. Save the changes and close the file

5. Reload the systemd daemon configuration by executing the following command

# systemctl daemon-reload

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.