MySQL错误日志[Note] InnoDB: page_cleaner: 1000ms intended loop took 6381ms.
今天看一个网友的MySQL数据库报下面的错误,下面说下原因和解决方式。
错误信息
2025-08-06T05:55:38.723995Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 6381ms. The settings might not be optimal. (flushed=1504 and evicted=0, during the time.) 2025-08-06T05:56:19.522177Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 7434ms. The settings might not be optimal. (flushed=280 and evicted=0, during the time.) 2025-08-06T05:58:02.982667Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 4329ms. The settings might not be optimal. (flushed=288 and evicted=0, during the time.) 2025-08-06T06:06:11.188151Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 4011ms. The settings might not be optimal. (flushed=200 and evicted=0, during the time.) 2025-08-06T06:12:57.490032Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 4321ms. The settings might not be optimal. (flushed=184 and evicted=0, during the time.)
错误原因
这个是InnoDB存储引擎发出的警告,级别是Note,不是严重的错误。
这个信息表示InnoDB的page_cleaner线程运行效率低。
[Note] InnoDB: page_cleaner: 1000ms intended loop took 6381ms.
page_cleaner是InnoDB的后台线程,用来将脏页写回磁盘。目标是1000ms,实际使用了6381ms。
flushed=1504 and evicted=0, during the time.
flushed表示多少页被刷新到了磁盘,evicted表示多少页被逐出缓存池。
一般原因是磁盘IO太低,写入速度过慢。
也有可能是缓存池过小,长事务执行阻塞了脏页刷新,服务器CPU负债过高,刷新到磁盘的参数配置不当等原因。
解决方式
检测磁盘IO性能,如果比较低就换个盘。如果磁盘不方便更换就增加 innodb_buffer_pool_size 的大小。
其他原因就对应检测或者升级硬件配置吧。




Discussion
New Comments
暂无评论。 成为第一个!