In my application, that deployed at linux, i need to open 30000-40000 sockets on virtual interfaces using threads.
I will get that exception after some time
com.jcraft.jsch.JSchException: java.net.SocketException: Too many open files
at com.jcraft.jsch.Util.createSocket(Util.java:386)
at com.jcraft.jsch.Session.connect(Session.java:186)
at com.jcraft.jsch.Session.connect(Session.java:154)
----------
I tried many system configuration like sysctl, ulimit and I also tried some
java option like -Xms1024m -Xmx4096m -XX:MaxPermSize=2048m -XX:ThreadStackSize=4000
but i never get rid of that exceptions.
This exception has great impact on my application.
Please suggest me what should i do?