lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Willnauer (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SOLR-861) SOLRJ Client does not release connections 'nicely' by default
Date Wed, 09 Jun 2010 12:49:13 GMT

    [ https://issues.apache.org/jira/browse/SOLR-861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12877064#action_12877064
] 

Simon Willnauer commented on SOLR-861:
--------------------------------------

Jiles, how would HTTP Client 4.0 solve this problem if you use the correspondent ConnectionManager
HTTPClient will still try to keep connections open to reuse them per route. Connection being
in the TCP close_wait state are totally valid while the application keeps the connection open.
Anyway this problem should be solved either with a SolrJ API or with by makeing a HttpClient
instance mandatory.
I would rather ask the user to maintain the HTTPClient instance rather than trying to be smart
about a 3rd party library.  You always have that problem with a connection manager which keeps
connections open though.
 
I would guess if we stick to a default ctor we should use the patch Ian is proposing as a
default.


> SOLRJ Client does not release connections 'nicely' by default
> -------------------------------------------------------------
>
>                 Key: SOLR-861
>                 URL: https://issues.apache.org/jira/browse/SOLR-861
>             Project: Solr
>          Issue Type: Bug
>          Components: clients - java
>    Affects Versions: 1.3
>         Environment: linux
>            Reporter: Ian Holsman
>         Attachments: SimpleClient.patch
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message