gpt4 book ai didi

MySQL 关于 max_open_files 和 table_open_cache 的警告

转载 作者:行者123 更新时间:2023-11-29 07:24:34 25 4
gpt4 key购买 nike

我在 Ubuntu 18 上有一个 MySQL 5.7 服务器。当服务器启动时,它会在 error.log 中写入以下警告:

[Warning] Changed limits: max_open_files: 5000 (requested 7500)
[Warning] Changed limits: table_open_cache: 1745 (requested 2000)

有人可以解释是什么导致了这些警告(以及我可以做些什么来让它们消失)?

最佳答案

回答我自己的问题。最大打开文件的限制在 systemd 脚本 /lib/systemd/system/mysql.service 中定义:

# MySQL systemd service file

[Unit]
Description=MySQL Community Server
After=network.target
....

LimitNOFILE=5000

将 LimitNOFILE 的值增加到 7500 解决了这两个警告。

关于MySQL 关于 max_open_files 和 table_open_cache 的警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54536753/

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