A stop job is running for MariaDB database service(Waiting for page_cleaner)

本页内容

A stop job is running for MariaDB database service(Waiting for page_cleaner) 原因及解决方法。

在关机或重启的时候发现:

A stop job is running for MariaDB database service.

居然需要耗时几十分钟,强制关机重启后,利用以下命令检查日志:

1$ journalctl -u mariadb.service
2Feb 25 14:37:57 archlinux mysqld[580]: 2020-02-25 14:37:57 0 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
3Feb 25 14:38:57 archlinux mysqld[580]: 2020-02-25 14:38:57 0 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
4Feb 25 14:39:57 archlinux mysqld[580]: 2020-02-25 14:39:57 0 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
5Feb 25 14:40:58 archlinux mysqld[580]: 2020-02-25 14:40:58 0 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
6...

解决

经过一番搜索,可以通过以下命令解决:

1$ timedatectl set-local-rtc 0

相关链接:

How to fix MariaDB when it gets stuck during shutdown (Waiting for page_cleaner)?

razonyang
2024年12月21日星期六 2020年2月25日星期二