Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm getting the error "too many open files". It appears to happen when by process has around 256 simultaneous connections. If I do

sysctl -A | grep maxfiles

I see:

kern.maxfiles = 12288
kern.maxfilesperproc = 10240

My server is managed by launchd. Do I also need to set the NumberOfFiles option in the plist file?

share|improve this question

migrated from stackoverflow.com Jan 1 '10 at 3:17

This question came from our site for professional and enthusiast programmers.

    
Number of files opened by what? Is this a shared drive letter than too many remote are connecting to, what is your situation? –  Jason Short Jan 1 '10 at 1:46
1  
This is probably related to the ulimit settings (ulimit -n) –  Joe Jan 1 '10 at 2:00
    
I had this issue when a program was trying to install an application in a corrupted .pkg file. Under what circumstances do you get the error? –  Clinton Blackmore Mar 9 '10 at 20:52

1 Answer 1

Default limit setting for bash on OSX looks like 256.

So, as Joe says:

ulimit -n x

Where x can be a higher number.

You might want to add that to the start script of the process when you run it, or to your .bashrc to make it more permanent.

lsof will let you see what each file is, although files in this context are also network connections, pipes, as well as actual files.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.