Uploaded image for project: 'XNIO'
  1. XNIO
  2. XNIO-258

No indication of "too many open files" problem in the logs / error messages

XMLWordPrintable

      XNIO NioTcpServer catches enormous amount of IOExceptions if process run out of free file descriptors when accepting a connection. The bad part is that there is no indication in the logs since exception is ignored in NioTcpServer.accept method:

      try {
        accepted = channel.accept();
        ...
      } catch (IOException e) {
        return null;
      } finally {
        ...
      }
      

      Moreover amount of exceptions thrown is very high for a small time period and it takes over the CPU extensively (not sure this can be improved since exceptions are thrown by java.nio.channels.ServerSocketChannel). We've been able to see this only after analyzing profiler snapshot which kept data about thrown exceptions.

      Request for enhancement arose when debugging investigating issues in Undertow which uses XNIO.

              dlloyd@redhat.com David Lloyd
              flush_dia Vladimir Tsukur (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: