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

Discussion in 'General' started by onastvar, Jan 17, 2023.

  1. onastvar

    onastvar Member

    Hello All,

    I have VPS with 8GB of RAM installed/setup via Perfect Server Automated ISPConfig 3. Entire server goes down because of OOM killer, after restart server works again. Last night, even after restart Apache2 server would not start. I had to restore entire server from 2:00AM backup. Does anyone have any advice on how to configure the server so it doesn't run out of memory. Any tips, tricks? Anything in my.cnf that should be configured?

    mysqladmin version: mysqladmin Ver 9.1 Distrib 10.5.18-MariaDB

    Thank You in advance!

    Code:
    Jan 15 17:49:59 server.mydomain.com mariadbd[851]: 2023-01-15 17:49:56 295032 [Warning] Aborted connection 295032 to db: 'dbispconfig' user: 'ispconfig' host: 'localhost' (Got an error writing communication packets)
    Jan 15 17:49:59 server.mydomain.com mariadbd[851]: 2023-01-15 17:49:56 295038 [Warning] Aborted connection 295038 to db: 'dbispconfig' user: 'ispconfig' host: 'localhost' (Got an error writing communication packets)
    Jan 15 17:50:39 server.mydomain.com systemd[1]: mariadb.service: A process of this unit has been killed by the OOM killer.
    Jan 15 17:50:39 server.mydomain.com systemd[1]: mariadb.service: Main process exited, code=killed, status=9/KILL
    Jan 15 17:50:39 server.mydomain.com systemd[1]: mariadb.service: Failed with result 'oom-kill'.
    Jan 15 17:50:39 server.mydomain.com systemd[1]: mariadb.service: Consumed 3h 9min 52.076s CPU time.
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Add swap.
    Although 8 GB should be enough. Maybe monitor what is using memory, then try to configure them to use less or remove those prosesses.
     
    onastvar likes this.
  3. pyte

    pyte Well-Known Member HowtoForge Supporter

  4. onastvar

    onastvar Member

    Thanks @Taleman / @pyte
    Regarding article from mariadb
    How to troubleshoot out-of-memory issues
    If the MariaDB server is crashing because of 'out-of-memory' then it is probably wrongly configured.

    "probably wrongly configured" how would this be possible if I installed/setup via Perfect Server Automated ISPConfig 3 and didn't make any other changes?
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Neither ISPConfig nor the perfect server guides configure MariaDB regarding resource usage, as this kind of configuration depends on your server size, memory, websites you run, usage of these sites and so on. This means the MariaDB configuration is set to the defaults that the operating system package maintainer has chosen as defaults, which fit most systems. But this does not necessarily mean that they fit your specific case. You can use tools like mysqltuner to get suggestions on how to configure mariadb parameters according to the way the sites on your system use the database.
     
    ahrasis, pyte and onastvar like this.
  6. onastvar

    onastvar Member

    Thank You @till, Is it possible to turn off logging for ISPConfig Control Panel?
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    The ISPConfig Log level is configurable under system > Server config. Set it to log level error to get the least amount or logged messages.
     
    onastvar likes this.

Share This Page