Home >Database >Mysql Tutorial >mysql报错Out of resources when opening file './xxx#P

mysql报错Out of resources when opening file './xxx#P

WBOY
WBOYOriginal
2016-06-07 16:36:221276browse

环境: ubuntu 12.04 mysql 5.5 抛出错误: Out of resources when opening file './xxx/Users#P#pid_78.MYD' (Errcode: 24) 查了一下,这个是跟打开文件数量有关,设置大点就好。 2个要点: 1、操作系统针对mysql用户的open files 数量增大 2、my.cnf 文件

环境:

ubuntu 12.04

mysql 5.5

抛出错误:


Out of resources when opening file './xxx/Users#P#pid_78.MYD' (Errcode: 24)

查了一下,这个是跟打开文件数量有关,设置大点就好。

2个要点:

1、操作系统针对mysql用户的open files 数量增大

2、my.cnf 文件里配置 open-files-limit 

操作过程:


vim /etc/security/limits.conf

加入内容:


mysql soft nofile 102400
mysql hard nofile 102400

vim /etc/mysql/my.cnf

在[mysqld]下加入内容:


open-files-limit=102400

 淡定的reboot就好。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn