Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-861

SOLRJ Client does not release connections 'nicely' by default

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 4.0-BETA
    • Component/s: clients - java
    • Labels:
      None
    • Environment:

      linux

      Description

      as-is the SolrJ Commons HttpServer uses the multi-threaded http connection manager. This manager seems to keep the connection alive for the client and does not close it when the object is dereferenced.

      When you keep on opening new CommonsHttpSolrServer instances it results in a socket that is stuck in the CLOSE_WAIT state. Eventually this will use up all your available file handles, causing your client to die a painful death.

      The solution I propose is that it uses a 'Simple' HttpConnectionManager which is set to not reuse connections if you don't specify a HttpClient.

        Attachments

        1. SimpleClient.patch
          0.8 kB
          Ian Holsman

          Issue Links

            Activity

              People

              • Assignee:
                siren Sami Siren
                Reporter:
                iholsman Ian Holsman
              • Votes:
                6 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: