Articles in this section

mariadb.service: A process of this unit has been killed by the OOM killer.

Plesk for Linux kb: technical database

Applicable to:

  • Plesk for Linux

Symptoms

  • Database dump fails with the following error:

    # plesk db dump example_db > /var/www/vhosts/example.com/example.sql
    signal: killed
    mysqldump: Got errno 32 on write

  • The following entries are found in /var/log/messages:

    test kernel: systemd invoked oom-killer: gfp_mask=0x201da, order=0, oom_score_adj=0
    test kernel: systemd cpuset=/ mems_allowed=0

    test kernel: lowmem_reserve[]: 0 0 0 0
    test kernel: Node 0 DMA: 3_4kB (M) 6_8kB (UEM) 7_16kB (UEM) 2_32kB (UM) 2_64kB (M) 1_128kB (E) 2_256kB (EM) 1_512kB (E) 2_1024kB (UE) 2_2048kB (EM) 0_4096kB = 7660kB
    test kernel: Node 0 DMA32: 283_4kB (UEM) 734_8kB (UE) 550_16kB (UE) 297_32kB (UEM) 222_64kB (UEM) 22_128kB (EM) 1_256kB (M) 0_512kB 0_1024kB 1_2048kB (M) 0_4096kB = 44636kB
    test kernel: Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
    test kernel: 58470 total pagecache pages
    test kernel: 0 pages in swap cache
    test kernel: Swap cache stats: add 0, delete 0, find 0/0
    test kernel: Free swap = 0kB
    test kernel: Total swap = 0kB
    test kernel: 524153 pages RAM

  • Dumping the database with the native MySQL command is successful:

    # MYSQL_PWD=cat /etc/psa/.psa.shadow mysqldump -uadmin example_db > /var/www/vhosts/example.com/example.sql

     

  • Memory on the server might be somewhat limited, e.g:

    # free -mh
    total used free shared buff/cache available
    Mem: 1.8G 734M 157M 235M 946M 696M
    Swap: 0B 0B 0B

Cause

The 'plesk db' command uses more memory than a native MySQL dump command. As a result, the process is being killed by OOM killer.

Resolution

Apply one or more of the following solutions:

  1. Adjust OOM settings

  2. Increase RAM on the server

  3. Use native mysqldump:

    # MYSQL_PWD=cat /etc/psa/.psa.shadow mysqldump -uadmin example_db > /var/www/vhosts/example.com/example.sql

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.