Thrift
  1. Thrift
  2. THRIFT-970

Under heavy load, THttpClient may fail with "too many open files"

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.2, 0.3, 0.4, 0.5
    • Fix Version/s: 0.6
    • Component/s: Java - Library
    • Labels:
      None
    • Environment:

      All

      Description

      THttpClient uses URL.openConnection which returns a HttpUrlConnection instance for each message transmission.

      HttpUrlConnection supposedly pools connections to the server. While stress testing an application, we've noticed that after several thousands requests, THttpClient would fail with a "Too many open files" error thrown in java.net.Socket.createImpl called from THttpClient.flush.

      As the underlying connection to the server is internally handled by HttpUrlConnection and the JVM, there is unfortunately not much that can be done to remedy this problem while still using HttpUrlConnection.

      I propose a new implementation of THttpClient which uses Apache HttpClient from Http Components instead of HttpUrlConnection.

      1. THRIFT-970-1
        8 kB
        Mathias Herberts
      2. THRIFT-970-2
        8 kB
        Mathias Herberts

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Mathias Herberts
            Reporter:
            Mathias Herberts
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development