Hello,
I'm having some difficulties with setting up a correct ulimit and I hope you can help me. I am running a tomcat server via jsvc and hence thought that configuring the ulimit for my 'tomcat' user would be the right way to go.
/etc/security/limits.conf
Code:
tomcat soft nofile 400000
tomcat hard nofile 400000
/etc/pam.d/login
Code:
session required pam_limits.so
All seems fine:
Code:
$ su - tomcat
$ ulimit -n
400000
But when I start the tomcat server and my application runs the lucene file indexer, I get a "too many open files" exception, although I'm sure that it doesn't index/open nearly as many files as the ulimit value is set to. For debugging, I also ran an lsof Script every few seconds, printing out the open file counts of all processes. It showed JSVC with a max of 1700 at any time, with all other processes using way less, as expected:
Code:
lsof -n | awk '{ print $1,$3 }' | grep -E '^[a-z]+' | sort | uniq -c |sort -n >> $file
Thanks in advance