hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: intermittent org.apache.http.ConnectionClosedException:
Date Thu, 20 Aug 2015 15:10:01 GMT
On Thu, 2015-08-20 at 20:31 +0530, Shushant Arora wrote:
> but its failing my job .Is there any eviction policy I should be handling
> or its automatically taken care of evicting the closed connections.
> 

You have not been listening, have you? The server closes the connection
on its end _prematurely_.

Oleg

> On Thu, Aug 20, 2015 at 8:02 PM, Oleg Kalnichevski <olegk@apache.org> wrote:
> 
> > On Thu, 2015-08-20 at 20:00 +0530, Shushant Arora wrote:
> > > Unplugging is not possible.
> > >
> > > How to capture the exception in code and detect if a connection is
> > closed -
> > > don't use it in further requests and create new one in pool (set to max
> > > connnection pool)?
> > >
> >
> > HttpClient manages persistent connections internally and automatically
> > discards connections that cannot be re-used.
> >
> > Oleg
> >
> >
> > > On Thu, Aug 20, 2015 at 7:55 PM, Oleg Kalnichevski <olegk@apache.org>
> > wrote:
> > >
> > > > On Thu, 2015-08-20 at 19:55 +0530, Shushant Arora wrote:
> > > > > how to avoid this exception - how to handle this.
> > > > >
> > > >
> > > > Unplugging your computer from the network will reliably eliminate the
> > > > problem.
> > > >
> > > > Oleg
> > > >
> > > > > On Thu, Aug 20, 2015 at 7:45 PM, Oleg Kalnichevski <olegk@apache.org
> > >
> > > > wrote:
> > > > >
> > > > > > On Thu, 2015-08-20 at 19:43 +0530, Shushant Arora wrote:
> > > > > > > Hi
> > > > > > >
> > > > > > > I am using HttpAsyncClients and
> > PoolingNHttpClientConnectionManager .
> > > > > > > Getting below exception when I increase no of http clients
on
> > > > machine.
> > > > > > What
> > > > > > > could be the reason and solution for this.
> > > > > > >
> > > > > > >
> > > > > > > org.apache.http.ConnectionClosedException: Connection closed
> > > > > > >         at
> > > > > > >
> > > > > >
> > > >
> > org.apache.http.nio.protocol.HttpAsyncRequestExecutor.endOfInput(HttpAsyncRequestExecutor.java:321)
> > > > > > >         at
> > > > > >
> > > > > > The opposite endpoint closed the connection on its end without
> > > > correctly
> > > > > > completing the message.
> > > > > >
> > > > > > Oleg
> > > > > >
> > > > > >
> > > > > > >
> > > > > >
> > > >
> > org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:263)
> > > > > > >         at
> > > > > > >
> > > > > >
> > > >
> > org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:81)
> > > > > > >         at
> > > > > > >
> > > > > >
> > > >
> > org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:39)
> > > > > > >         at
> > > > > > >
> > > > > >
> > > >
> > org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:116)
> > > > > > >         at
> > > > > > >
> > > > > >
> > > >
> > org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:164)
> > > > > > >         at
> > > > > > >
> > > > > >
> > > >
> > org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:339)
> > > > > > >         at
> > > > > > >
> > > > > >
> > > >
> > org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:317)
> > > > > > >         at
> > > > > > >
> > > > > >
> > > >
> > org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:278)
> > > > > > >         at
> > > > > > >
> > > > > >
> > > >
> > org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:106)
> > > > > > >         at
> > > > > > >
> > > > > >
> > > >
> > org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:590)
> > > > > > >         at
> > > > > > >
> > > > > >
> > > >
> > org.apache.http.impl.nio.reactor.SessionInputBufferImpl.fill(SessionInputBufferImpl.java:206)
> > > > > > >         at
> > > > > > >
> > > > > >
> > > >
> > org.apache.http.impl.nio.codecs.AbstractMessageParser.fillBuffer(AbstractMessageParser.java:138)
> > > > > > >         at
> > > > > > >
> > > > > >
> > > >
> > org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:243)
> > > > > > >         at
> > > > > > >
> > > > > >
> > > >
> > org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:81)
> > > > > > >         at
> > > > > > >
> > > > > >
> > > >
> > org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:39)
> > > > > > >         at
> > > > > > >
> > > > > >
> > > >
> > org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:116)
> > > > > > >         at
> > > > > > >
> > > > > >
> > > >
> > org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:164)
> > > > > > >         at
> > > > > > >
> > > > > >
> > > >
> > org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:3
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> > > > > > For additional commands, e-mail:
> > httpclient-users-help@hc.apache.org
> > > > > >
> > > > > >
> > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> > > > For additional commands, e-mail: httpclient-users-help@hc.apache.org
> > > >
> > > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> > For additional commands, e-mail: httpclient-users-help@hc.apache.org
> >
> >



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message