Buffon
asked on
Too many open files
I got exceptions like:
java.net.SocketException: Too many open files
java.net.PlainSocketImpl.s ocketAccep t(Native Method)
java.net.PlainSocketImpl.a ccept(Plai nSocketImp l.java:384 )
java.net.ServerSocket.impl Accept(Ser verSocket. java:450)
java.net.ServerSocket.acce pt(ServerS ocket.java :421)
or
java.io.IOException: java.io.IOException: Too many open files
java.lang.UNIXProcess.<ini t>(UNIXPro cess.java: 148)
java.lang.ProcessImpl.star t(ProcessI mpl.java:6 5)
java.lang.ProcessBuilder.s tart(Proce ssBuilder. java:451)
java.lang.Runtime.exec(Run time.java: 591)
java.lang.Runtime.exec(Run time.java: 429)
java.lang.Runtime.exec(Run time.java: 326)
or
java.io.IOException: Too many open files
sun.nio.ch.IOUtil.initPipe (Native Method)
sun.nio.ch.PollSelectorImp l.<init>(P ollSelecto rImpl.java :40)
sun.nio.ch.PollSelectorPro vider.open Selector(P ollSelecto rProvider. java:18)
java.nio.channels.Selector .open(Sele ctor.java: 209)
after those, which happened in different threads my application got stuck. What is this? Some kind of unix/linux problems or java? What can be done?
java.net.SocketException: Too many open files
java.net.PlainSocketImpl.s
java.net.PlainSocketImpl.a
java.net.ServerSocket.impl
java.net.ServerSocket.acce
or
java.io.IOException: java.io.IOException: Too many open files
java.lang.UNIXProcess.<ini
java.lang.ProcessImpl.star
java.lang.ProcessBuilder.s
java.lang.Runtime.exec(Run
java.lang.Runtime.exec(Run
java.lang.Runtime.exec(Run
or
java.io.IOException: Too many open files
sun.nio.ch.IOUtil.initPipe
sun.nio.ch.PollSelectorImp
sun.nio.ch.PollSelectorPro
java.nio.channels.Selector
after those, which happened in different threads my application got stuck. What is this? Some kind of unix/linux problems or java? What can be done?
ASKER
all the filestreams are closed explicitly in the end of each thread. I think its because I have many open sockets and files concurrently may be? What is the limit?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok, it seems as right direction. I will check it ASAP and will be back to you. 10x.
ASKER
sorry I was away for a long time :( currently I am trying to install lsof utility:
https://www.experts-exchange.com/questions/22045878/lsof.html
https://www.experts-exchange.com/questions/22045878/lsof.html
You should explicitly close them