wood burning stoves 2.0*
The moose likes Linux / UNIX and the fly likes Too many files open in Linux post Maven implementation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Too many files open in Linux post Maven implementation" Watch "Too many files open in Linux post Maven implementation" New topic
Author

Too many files open in Linux post Maven implementation

Faraz Ka
Ranch Hand

Joined: Jun 01, 2013
Posts: 53
Hello,

In my application, I am reading some set of properties from the file system ( over 150 in count) and sometimes repeatedly.
It was working fine. Run time : Jetty and OS : Linux.

Later, the Maven support was added to it and then we are getting the following error.
java.io.FileNotFoundException: /root/books/authors/properties.ini (Too many open files)

Any clue what need to be fixed?

Also the OS, ulimit -a parameters are

core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 46649
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 3072
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) unlimited
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited



Appreciate any help!

Thanks,
FK
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16065
    
  21

I just did a quick check and on my development machines, the open file limit is 1024. And that's with Maven builds going on all day long. Only my database servers actually override that limit.

You might want to check to see what your Maven build is doing that would run out of files when you have a limit of 3072 - about 3 times what I have. Maybe a plugin is being sloppy about closing files when it's done using them.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Too many files open in Linux post Maven implementation