Question

MariaDB process getting killed once a day on fresh CentOS 7 install

  • Posted September 17, 2014

Hi guys,

Basically, MariaDB is getting killed randomly once a day, sometimes it lasts for a couple of days and then it goes down. The logs say it’s being killed and not restarting. I checked the server load and it is super low, as I am only hosting a couple domains with almost no traffic.

I can restart the service again no problem using “service mariadb start”, but eventually it gets killed.

# service mariadb status
Redirecting to /bin/systemctl status  mariadb.service
mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
   Active: inactive (dead) since Tue 2014-09-16 18:53:31 IST; 16h ago
  Process: 3461 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS)
  Process: 3460 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)
  Process: 3433 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
 Main PID: 3460 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/mariadb.service

Sep 16 10:11:44 serverizr mysqld_safe[3460]: 140916 05:11:44 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
Sep 16 10:11:44 serverizr mysqld_safe[3460]: 140916 05:11:44 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Sep 16 10:11:45 serverizr systemd[1]: Started MariaDB database server.
Sep 16 18:53:23 serverizr mysqld_safe[3460]: /usr/bin/mysqld_safe: line 182:  3619 Killed                  nohup /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/u
Sep 16 18:53:30 serverizr mysqld_safe[3460]: 140916 13:53:30 mysqld_safe Number of processes running now: 0
Sep 16 18:53:30 serverizr mysqld_safe[3460]: 140916 13:53:30 mysqld_safe mysqld restarted
Sep 16 18:53:30 serverizr mysqld_safe[3460]: /usr/bin/mysqld_safe: line 182:  7510 Killed                  nohup /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/u
Sep 16 18:53:31 serverizr mysqld_safe[3460]: 140916 13:53:31 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended

I’ve been searching for help on how to solve this but so far, no solution has worked and the logs are not saying much.

Any ideas?

Thanks!

Subscribe
Share

@kamaln7 that was exactly my first thought. However, there is nothing else in the mariadb.log besides “xxx table is marked as crashed and should be repaired” messages and all that I pasted in my original post.

I recently started the service using “mysqld_safe” instead of “service mariadb start” and it hasn’t crashed for 24 hours. Does it make any difference?

MariaDB crashing usually means that your droplet is running out of memory. Do you see any errors in /var/log/mariadb/mariadb.log?

sudo tail -30 /var/log/mariadb/mariadb.log

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Have same problem. Yes, MariaDB out of memory, but in this moments number of processes over average value. Like this: Memory graph processes graph Maybe need limit number of processes?

This comment has been deleted