Why is mariadb.service not restarted by systemd after OOM kill

The mysql.service got killed by the OOM killer. While investigating the root cause I wanted to change the unit configuration to restart if killed. I was surprised to find

already in the default unit configuration file. Readingfreedesktop.org/software/systemd/man/latest/systemd.service.html I think when getting killed by OOM systemd should restart the service. Testing on a non production server with kill -9 pid shows the expected behavior, the service is automatically restarted.

A simple systemctl restart mysql.service did work, so there should be nothing preventing systemd from bringing the service back up. So why is my service not restarted ?

Edit to anwser request in the comments

• The System is Debian 12

• mysql just symlinks to mariadb . But it is mariadb.

• The unit file is the default delivered by the maintainers

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论