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 <ol...@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 <ol...@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-unsubscr...@hc.apache.org
> > > > For additional commands, e-mail: httpclient-users-h...@hc.apache.org
> > > >
> > > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
> > For additional commands, e-mail: httpclient-users-h...@hc.apache.org
> >
> >



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

Reply via email to