Jonty,

That blog post explain what the problem is, but solution described there
works for jdk's http
client<http://docs.oracle.com/javase/1.4.2/docs/api/java/net/URL.html#openConnection()>only.
AFAIK you use Commons Http client, please refer to its' manuals or
post your question to related forum. Perhaps increasing the
timeout<http://hc.apache.org/httpclient-3.x/apidocs/org/apache/commons/httpclient/HttpConnectionManager.html#closeIdleConnections(long)>
help
you.

Regards

On Sat, Jan 14, 2012 at 2:56 PM, Jonty Rhods <jonty.rh...@gmail.com> wrote:

> Hi,
>
> I set the parameter as describe in the blog link but still same problem I
> am facing.
> In test class when I run it, It run perfectly few minutes but after
> certain thread it start responding slow and at same time the CLOSE_WAIT
> start increasing. I also notice that when I terminate test class all
> CLOSE_WAIT become TIME_WAIT and in a minute TIME_WAIT cleaned.
>
> Please help..
>
>
> On Fri, Jan 13, 2012 at 11:10 PM, Mikhail Khludnev <
> mkhlud...@griddynamics.com> wrote:
>
>> Hello,
>>
>> It sounds like disabled http keep alive (connection cache). Here is the
>> solution<
>> http://blog.griddynamics.com/2011/04/fast-hessian-methods-leads-to.html
>> >for
>>
>> jdk's http client. Unfortunately I have no experience with your
>> Commons
>> Http Client,  but cm.closeIdleConnections(0L) looks very suspicious.
>>
>> Please let me know whether it works for you.
>>
>> Regards
>>
>> On Fri, Jan 13, 2012 at 7:24 PM, Jonty Rhods <jonty.rh...@gmail.com>
>> wrote:
>>
>> > Hi All ,
>> >
>> > I am facing problem of too many CLOSE_WAIT.
>> > My env is  :
>> >
>> > solr 3.4 in Linux RHEL 5.2. I am getting around 1 million request per
>> day
>> > on application server on my production.
>> > Production server is communicating locally with solr server.
>> > I have 5 core setup and for each core I am using seprate instance of
>> > solrServer with following snippet of code.
>> >
>> > MultiThreadedHttpConnectionManager cm=new
>> > MultiThreadedHttpConnectionManager();
>> >            cm.getParams().setMaxTotalConnections(100);
>> >            cm.getParams().setDefaultMaxConnectionsPerHost(100);
>> >            cm.closeIdleConnections(0L);
>> >            HttpClient httpClient=new HttpClient(cm);
>> >            server=new CommonsHttpSolrServer(url, httpClient);
>> >
>> > At starting my server responding fine but as time progress it start
>> > responding slow and then stop working (within a day). Only solution at
>> that
>> > time is to reset the application server.
>> > What I notice is at the time when server start responding slow that time
>> > CLOSE_WAIT increased. When I reset the application server CLOSE_WAIT
>> become
>> > 0. I search and find it is due to CLOSE_WAIT.
>> >
>> > Please suggest me how to resolve this CLOSE_WAIT issue.
>> >
>> > BR
>> > Jonty
>> >
>>
>>
>>
>> --
>> Sincerely yours
>> Mikhail Khludnev
>> Lucid Certified
>> Apache Lucene/Solr Developer
>> Grid Dynamics
>>
>> <http://www.griddynamics.com>
>>  <mkhlud...@griddynamics.com>
>>
>
>


-- 
Sincerely yours
Mikhail Khludnev
Lucid Certified
Apache Lucene/Solr Developer
Grid Dynamics

<http://www.griddynamics.com>
 <mkhlud...@griddynamics.com>

Reply via email to