Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 08-01-2012, 07:52 AM   #1
LQ Newbie
Registered: Oct 2007
Posts: 2

Rep: Reputation: 0
Too many open files on Debian 6


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.

tomcat           soft    nofile          400000
tomcat           hard    nofile          400000
session    required
All seems fine:
$ su - tomcat
$ ulimit -n
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:
lsof -n | awk '{ print $1,$3 }' | grep -E '^[a-z]+' | sort | uniq -c |sort -n >> $file
Thanks in advance
Old 08-02-2012, 01:07 AM   #2
Senior Member
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Check your startup script, it may be resetting limits - it's also possible that ulimit settings are not coming through if you're su'ing to tomcat.
Old 08-02-2012, 02:21 AM   #3
LQ Newbie
Registered: Oct 2007
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks, but I've written the init script myself. When I login directly as tomcat user, the ulimit is correct also.

I have installed tomcat from source. Could it be, that I need to configure anything else pam related?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
mmap cache can't open foo.php - Too many open files guarriman Linux - Software 3 12-16-2013 01:03 PM
[SOLVED] I cant open xls files in a shared folder using open office 3.1 aries_baluyot Linux - Software 21 10-13-2010 03:52 AM
Cant open .dat files (video) by double clicking though I can open it by openwith.. ravi_npatty Linux - Newbie 17 07-31-2007 08:19 PM
how to open files from a network server from open office or any apps reycapoy Linux - Software 4 01-26-2006 07:00 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:53 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration