0

First i have read this Mysql often crashes didn't help . My own case is that msqld is stopping with exited status . I have also tried running a cron job with systemctl is-active mysqld || systemctl restart mysqld still same issue .

My question is how to monitor exited status and restart mysqld ?

More detail

CentOS 7.7.1908 .

Mysql 10.1.44 MariaDB

Ram 2GB

Core 2

Just a Wordpress Site

Log as requested

Trustdee
  • 1
  • 1
  • show us the error log of mysql, there you find usually the cause – nbk Apr 22 '20 at 22:09
  • here is what i currently have if that helps : [Pastebin.com](https://pastebin.com/sZJ5GvVt) – Trustdee Apr 22 '20 at 22:25
  • perfect. Welcome to SO. You can edit your own question to include more information and this is encouraged as the transient nature of external links can degrade the usefulness of this question to the next person that encounters the same problem. – danblack Apr 22 '20 at 22:31

1 Answers1

1
2020-04-23  4:38:39 47136771361152 [Note] InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(140574720 bytes) failed; errno 12
2020-04-23  4:38:39 47136771361152 [ERROR] InnoDB: Cannot allocate memory for the buffer pool

means while you have 2G ram on the VM, you don't have it available for MariaDB. Maybe optimize the memory usage of apache(?) and whenever else is running on the server.

Alternately allocate more RAM.

danblack
  • 12,130
  • 2
  • 22
  • 41