日期:2014-05-16  浏览次数:20870 次

有关open-files-limit的疑问
在ubuntu中的/etc/security/limits.conf设置:
* hard nofile 65535
* soft nofile 65535
并且该设置已经生效,但在/etc/mysql/my.cnf中配置open-files-limit时发现,该参数可以配置为open-files-limit=80000,
为什么可以配置成功,它不是受/etc/security/limits.conf中配置的限制吗?

------解决方案--------------------
配置是可以成功的 但是实际使用是受到操作系统限制的
------解决方案--------------------
你应该可以看到mysql error log中有错误提示:

[Warning] Could not increase number of max_open_files to more than *** (request: ***)
这样的错误

------解决方案--------------------
/etc/security/limits.conf不是受此配置限制的,配置安全先关项的。