hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Boniface <tho...@stickyads.tv>
Subject Re: Pool congestion
Date Wed, 20 May 2015 15:53:51 GMT
Just to make sure as I'm using log4j2, the configuration is slightly
different. When testing locally I have logs that looks like this:

org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager:
2015-05-20 17:45:56,595 DEBUG http-nio-8080-exec-3 [Req_12] [    ]
Connection request: [route: {}->http://sandbox.stickyadstv.com:80][total
kept alive: 1; route allocated: 1 of 10; total allocated: 1 of 10]
org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager:
2015-05-20 17:45:56,617 DEBUG I/O dispatcher 6 [    ] [    ] Connection
leased: [id: http-outgoing-5][route:
{}->http://sandbox.stickyadstv.com:80][total
kept alive: 0; route allocated: 1 of 10; total allocated: 1 of 10]
org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl: 2015-05-20
17:45:56,617 DEBUG I/O dispatcher 6 [    ] [    ] http-outgoing-5
192.168.0.89:54298<->5.135.147.172:80[ACTIVE][r:]: Set attribute
http.nio.exchange-handler
org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl: 2015-05-20
17:45:56,618 DEBUG I/O dispatcher 6 [    ] [    ] http-outgoing-5
192.168.0.89:54298<->5.135.147.172:80[ACTIVE][rw:]: Event set [w]
org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl: 2015-05-20
17:45:56,618 DEBUG I/O dispatcher 6 [    ] [    ] http-outgoing-5
192.168.0.89:54298<->5.135.147.172:80[ACTIVE][rw:]: Set timeout 0
org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl: 2015-05-20
17:45:56,618 DEBUG I/O dispatcher 6 [    ] [    ] http-outgoing-5
192.168.0.89:54298<->5.135.147.172:80[ACTIVE][rw:]: Set attribute
http.nio.http-exchange-state
org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl: 2015-05-20
17:45:56,618 DEBUG I/O dispatcher 6 [    ] [    ] http-outgoing-5
192.168.0.89:54298<->5.135.147.172:80[ACTIVE][rw:]: Set timeout 60000
org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl: 2015-05-20
17:45:56,618 DEBUG I/O dispatcher 6 [    ] [    ] http-outgoing-5
192.168.0.89:54298<->5.135.147.172:80[ACTIVE][rw:]: Event set [w]
org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl: 2015-05-20
17:45:56,618 DEBUG I/O dispatcher 6 [    ] [    ] http-outgoing-5
192.168.0.89:54298<->5.135.147.172:80[ACTIVE][rw:w]: 883 bytes written
org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl: 2015-05-20
17:45:56,618 DEBUG I/O dispatcher 6 [    ] [    ] http-outgoing-5
192.168.0.89:54298<->5.135.147.172:80[ACTIVE][r:w]: Event cleared [w]
org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl: 2015-05-20
17:45:56,653 DEBUG I/O dispatcher 6 [    ] [    ] http-outgoing-5
192.168.0.89:54298<->5.135.147.172:80[ACTIVE][r:r]: 1349 bytes read
org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl: 2015-05-20
17:45:56,653 DEBUG I/O dispatcher 6 [    ] [    ] http-outgoing-5
192.168.0.89:54298<->5.135.147.172:80[ACTIVE][r:r]: Remove attribute
http.nio.exchange-handler
org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager:
2015-05-20 17:45:56,653 DEBUG I/O dispatcher 6 [    ] [    ] Releasing
connection: [id: http-outgoing-5][route:
{}->http://sandbox.stickyadstv.com:80][total kept alive: 0; route
allocated: 1 of 10; total allocated: 1 of 10]
org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager:
2015-05-20 17:45:56,653 DEBUG I/O dispatcher 6 [    ] [    ] Connection
[id: http-outgoing-5][route: {}->http://sandbox.stickyadstv.com:80] can be
kept alive for 15.0 seconds
org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl: 2015-05-20
17:45:56,653 DEBUG I/O dispatcher 6 [    ] [    ] http-outgoing-5
192.168.0.89:54298<->5.135.147.172:80[ACTIVE][r:r]: Set timeout 0
org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager:
2015-05-20 17:45:56,653 DEBUG I/O dispatcher 6 [    ] [    ] Connection
released: [id: http-outgoing-5][route:
{}->http://sandbox.stickyadstv.com:80][total
kept alive: 1; route allocated: 1 of 10; total allocated: 1 of 10]

Is this helpful if we log this in a real production environment (this will
represent a high volume of data considering the number of request
processed, could be up to 200k line per seconds) to know why lock seem to
occur ?

Thomas

2015-05-20 16:09 GMT+02:00 Oleg Kalnichevski <olegk@apache.org>:

> On Wed, 2015-05-20 at 16:07 +0200, Thomas Boniface wrote:
> > I assume when using http async client the package to log is
> > org.apache.http.impl.nio.conn instead of org.apache.http.impl.conn ?
> >
>
> Yes. Or some such.
>
> Oleg
>
> > We are using the latest stable release already.
> >
> > 2015-05-19 10:30 GMT+02:00 Oleg Kalnichevski <olegk@apache.org>:
> >
> > > On Mon, 2015-05-18 at 11:11 +0200, Thomas Boniface wrote:
> > > > Thanks your answers, also hystrix seems pretty interesting. I'll
> have a
> > > > look into it.
> > > >
> > > > Regarding my problem, I observed some cases where my application
> becomes
> > > > apparently stuck. After nothing happens in my application log for a
> > > couple
> > > > of seconds a thread dump is made. This thread dump showed that all
> I/O
> > > > dispatcher threads and all the http nio threads were waiting for the
> a
> > > lock
> > > > from AbstractNIOConnPool.
> > > >
> > >
> > > Please run the client with context logging for connection management
> > > turned on as described here to find out why HttpClient is trying to
> > > acquire the pool lock.
> > >
> > > http://hc.apache.org/httpcomponents-client-4.4.x/logging.html
> > >
> > > Please also make sure you are using the latest stable release of
> > > HttpAsyncClient (which is 4.1).
> > >
> > > Oleg
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message