Linux – maximum of open files per process in Linux

debianlinuxmax-file-descriptors

My question is pretty simple and is actually stated in the title. One of my applications throws errors regarding "too many open files" at me, even tho the limit for the user the application runs with is higher than the default of 1024 (lsof -u $USER reports 3000 open fds).

Because I cannot imagine why this happens, I guess there might be a maximum per process.

Any idea is very appreciated!

Edit: Some values that might help…

root@Debian-60-squeeze-64-minimal ~ # ulimit -n
100000

root@Debian-60-squeeze-64-minimal ~ # tail -n 4 /etc/security/limits.conf 
myapp  soft nofile 100000
myapp  hard nofile 1000000
root soft nofile 100000
root hard nofile 1000000

root@Debian-60-squeeze-64-minimal ~ # lsof -n -u myapp | wc -l
2708

Best Answer

Yes, the ulimit facility limits the number of open files and many other things like stack size, core dump size, etc.