Olged when you say "You really do not want several dozen threads trying to initiate a request all at the same time.". I'm a bit surprised this basically what our application need to do and what I though http async was about. This leads me to the following questions:
Why shouldn't we do this or should we use http-async to be compliant with its design ? Should we look into another technology if http-async does not fit this use case ? Thanks 2015-05-27 13:26 GMT+02:00 Oleg Kalnichevski <[email protected]>: > On Wed, 2015-05-27 at 10:51 +0200, Thomas Boniface wrote: > > Hi, > > > > We managed to observe our issue once again, this time with connection > > logging. Here is the situation: > > > > No activity was detected on the application log for a few seconds, > > triggering a tomcat thread dump. > > > > The thread dump shows all http-nio-127.0.0.1-8080-exec-* threads waiting > on > > > org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.requestConnection > > while all I/O dispatcher threads are waiting on > > > org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.releaseConnection. > > > > The application log (covering the last 2 sec of activity before the > > application being stuck) shows activity on the http async client until a > > point where we received requests that are supposed to trigger http > > communication to upstream servers but nothing is logged by http client (I > > assume because the threads from incoming requests are waiting to lease a > > connection). > > > > Here are the corresponding logs: > > http://s000.tinyupload.com/index.php?file_id=15495126975418045294 > > > > Thanks, > > Thomas > > > > Thomas > I am sorry but really cannot sift through 300MB of logs. What I can > glean from a cursory look is there appears to be no dead-lock, just a > lot of threads contending for the lock <0x00000000be315a50>. The lock > does not look to be locked by any tread. > > Therefore this is unlikely to be due to a bug in HttpClient and more > likely to be due to the design of your application. One thing that I > find bizarre is that why there are so many threads are contending for > the lock in the first place. This looks wrong. You really do not want > several dozen threads trying to initiate a request all at the same time. > > Oleg > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
