gpt4 book ai didi

mysql - 如何更改 Google SQL Cloud 上的 innodb_lru_scan_depth 值?

转载 作者:行者123 更新时间:2023-11-29 19:33:05 24 4
gpt4 key购买 nike

在我们的一个实例中,我们遇到了这种错误:

2017-01-11T11:12:48.513497Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 5745ms. The settings might not be optimal. (flushed=614 and evicted=0, during the time.)

该错误每次在日志中弹出时都会开始一系列相同的错误,并且在某些情况下,由于巧合的其他事件,导致实例长时间无响应。

现在,社区支持委员会给出的建议之一是更改 innodb_lru_scan_depth 的设置,将其从默认的 1024 降低到 256。

我检查了 mysql 实例标志,但看不到它,所以我尝试直接访问实例并运行:

SET GLOBAL innodb_lru_scan_depth=256;

不幸的是,如果没有SUPER权限,我们无法更改该设置。

ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER privilege(s) for this operation

那么我应该如何更改该值?还有其他我不知道的方法吗?

此外,我知道更改该设置并不是真正的“解决方案”,因为这意味着我们运行的查询对于硬件而言过于繁重。原因是这些查询每月运行一次,因此并不值得为此升级实例的硬件。

最佳答案

它必须在 super 权限下完成,例如:

SET GLOBAL innodb_lru_scan_depth=256;

基本上,必须在服务器不处于事件模式时完成。

关于mysql - 如何更改 Google SQL Cloud 上的 innodb_lru_scan_depth 值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41675196/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com