Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-2581

Too many open files error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • nightly
    • None
    • client-api
    • None
    • Linux version 2.6.15-26-amd64-k8, Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_08-b03, mixed mode)

    Description

      I'm running out of sockets after a few minutes. The same client works fine on Mac OS X (JMX 1.5.0_07).
      The client sends 2 requests type to the server(s):

      • type 1: 0.2 requests/second. Service time 50 seconds (avg)
      • type 2: 1.8 requets/seconds. Service time 5 seconds (avg).

      After about 10 minutes the client crashes because the client machine runs out of sockets (ulimit -n = 1024):

      [java] ERROR Sender:logException ERROR!:
      [java] ncl.qosp.test.functional.client.Sender.logException(Unknown Source) ERROR [pool-1-thread-1] - ERROR!:
      [java] ERROR Sender:run Failed send #20588
      [java] ncl.qosp.test.functional.client.Sender.run(Unknown Source) ERROR [pool-1-thread-2] - Failed send #20588
      [java] ERROR Sender:logException org.apache.axis2.AxisFault: Too many open files; nested exception is:
      [java] java.net.SocketException: Too many open files
      [java] at org.apache.axis2.AxisFault.makeFault(AxisFault.java:321)
      [java] at org.apache.axis2.transport.http.SimpleHTTPServer.getEPRsForService(SimpleHTTPServer.java:263)
      [java] at org.apache.axis2.engine.ListenerManager.getEPRforService(ListenerManager.java:108)
      [java] at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:273)
      [java] at org.apache.axis2.client.ServiceClient.sendReceiveNonBlocking(ServiceClient.java:633)
      [java] at org.apache.axis2.client.ServiceClient.sendReceiveNonBlocking(ServiceClient.java:601)
      [java] at ncl.qosp.test.functional.client.Sender.run(Unknown Source)
      [java] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
      [java] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
      [java] at java.lang.Thread.run(Thread.java:595)
      [java] Caused by: java.net.SocketException: Too many open files
      [java] at java.net.NetworkInterface.getAll(Native Method)
      [java] at java.net.NetworkInterface.getNetworkInterfaces(NetworkInterface.java:204)
      [java] at org.apache.axis2.transport.http.server.HttpUtils.getIpAddress(HttpUtils.java:72)
      [java] at org.apache.axis2.transport.http.SimpleHTTPServer.getEPRsForService(SimpleHTTPServer.java:258)
      [java] ... 8 more

      All ServiceClient objects share the following ConfigurationContext:

      ConfigurationContext configurationContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null);
      HttpClient httpClient = new HttpClient(new MultiThreadedHttpConnectionManager());
      configurationContext.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE);
      configurationContext.setProperty(HTTPConstants.CACHED_HTTP_CLIENT, httpClient);

      Attachments

        1. TestIO.java
          0.5 kB
          Michele Mazzucco

        Activity

          People

            Unassigned Unassigned
            michelemazzucco Michele Mazzucco
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: