lucene-dev mailing list archives

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

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

Jilles van Gurp commented on SOLR-861:
--------------------------------------

I noticed CommonsHttpSolrServer still depends on httpclient 3.x. You can easily solve this
issue by migrating to 4.0 and using the new response handler interface to handle responses
with a callback. HttpClient does all the right things after the callback method exits. In
any case a variant of this class based on httpclient 4.0 would be preferable for me since
our project currently depends on both 3.x and 4.0 (for all our own stuff) and I'd like to
get rid of all 3.x dependencies. 

If needed I can help provide some code (though at this point I don't have a solr build environment
set up at all).

> 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