Too many files open issue (in CentOS)

Posted by Ram on Server Fault See other posts from Server Fault or by Ram
Published on 2011-03-11T06:50:21Z Indexed on 2011/03/11 8:12 UTC
Read the original article Hit count: 148

Filed under:
|

Recently I ran into this issue in one of our production machines. The actual issue from PHP looked like this:

fopen(dberror_20110308.txt): failed to open stream: Too many open files

I am running LAMP stack along with memcache in this machine. I also run a couple of Java applications in this machine. While I did increase the limit on the number of files that can be opened to 10000 (from 1024), I would really like to know if there is an easy way to track this (# of files open at any moment) as a metric. I know lsof is a command which will list the file descriptors opened by processes. Wondering if there is any other better (in terms of report) way of tracking this using say, nagios.

© Server Fault or respective owner

Related posts about centos

Related posts about many-files