今天朋友向我反映网站出现错误:Out of resources when opening file './xxx.MYD' (Errcode: 24)错误是因为打开的文件数超过了my.cnf的--open-files-limit。open-files-limit选项无法在mysql命令行 直接修改,必须在my.cnf中设定. 如果你要是不设置的话,他会取系统ulimit -n的值.

出错之时,参数配置如下:

 
1
2
3
4
5
6
7
;
+
|
+
|
+
)

修改open file的值,ulimit -n 204800. 或者在/etc/profile的最后一样加上ulimit -u 204800 -HSn 204800. 执行 source /etc/profile,最后重启一下数据库。

 
1
# service mysql restart

查看目前的情况佮.

 
1
2
3
4
5
6
7
;
+
|
+
|
+
)

配置数据库的时候千万不要忘记设置这个了。

相关文章:

  • 2022-12-23
  • 2021-08-25
  • 2022-01-16
  • 2022-12-23
  • 2021-05-30
  • 2022-12-23
  • 2021-08-25
  • 2022-12-23
猜你喜欢
  • 2021-10-06
  • 2022-01-22
  • 2022-02-22
  • 2022-12-23
  • 2022-12-23
  • 2021-08-23
  • 2022-01-21
相关资源
相似解决方案