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

Notices


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

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


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
 
Old 08-02-2012, 01:07 AM   #2
kbp
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
flocntl
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?
 
  


Reply


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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

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