0

Im unclear this error occurs on my client code but is the the 'Too many files' message ocurring on client or server

java.net.SocketException: Too many open files
    at java.net.Socket.createImpl(Socket.java:460)
    at java.net.Socket.connect(Socket.java:587)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
    at sun.net.www.http.HttpClient.New(HttpClient.java:308)
    at sun.net.www.http.HttpClient.New(HttpClient.java:326)
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1167)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1103)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:997)
    at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:931)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1511)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1439)
Paul Taylor
  • 13,411
  • 42
  • 184
  • 351
  • it might help http://stackoverflow.com/questions/5656458/java-net-socketexception-too-many-open-files – RockAndRoll Nov 01 '15 at 21:24
  • 1
    If you inspect the complete stacktrace out will see some method StackTraceElement entry which coresponds either to your server code or client code, and that answers your question. – hotzst Nov 01 '15 at 21:24
  • the exception is ocurring on client but im unclear if its running out of files or reporting that the server has run out of files – Paul Taylor Nov 01 '15 at 21:29
  • Why not check the source ? There you can see what is done when the exception occurs and if it is only a reaction to a server problem – Marged Nov 01 '15 at 21:39
  • Looks like on the client, as it tries to open a new socket for the new connection. – Alexander Torstling Nov 01 '15 at 21:40
  • I think another problem caused an exception on the client, and the client isnt clearing up after itself – Paul Taylor Nov 02 '15 at 14:38

0 Answers0