hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Ross <gr...@uis.cam.ac.uk>
Subject Pooling Connection Manager Issue
Date Tue, 26 Apr 2016 11:27:46 GMT
I’m using HTTP Client 4.3.5 with Java 1.7 on Ubuntu Linux.

I’m having problems where the pooling connection manager suddenly claims to have no routes
to a host.

Usually, in my logs I see:

2016-04-26 11:13:08,588 [TP-Processor5] DEBUG conn.PoolingHttpClientConnectionManager - Connection
request: [route: {}->http://example.com:80][total kept alive: 1; route allocated: 1 of
50; total allocated: 1 of 200]
2016-04-26 11:13:08,588 [TP-Processor5] DEBUG conn.PoolingHttpClientConnectionManager - Connection
leased: [id: 1][route: {}->http://example.com:80][total kept alive: 0; route allocated:
1 of 50; total allocated: 1 of 200]
2016-04-26 11:13:08,588 [TP-Processor5] DEBUG conn.DefaultManagedHttpClientConnection - http-outgoing-1:
Close connection

But occasionally, I see:

2016-04-26 10:54:05,287 [TP-Processor3] DEBUG conn.PoolingHttpClientConnectionManager - Connection
request: [route: {}->http://example.com:80][total kept alive: 0; route allocated: 50 of
50; total allocated: 50 of 200]

i.e. suddenly the routes allocated has jumped from 1 of 50 to 50 of 50.

What’s going on? If I had some form of leak, surely I’d see the routes allocated slowly
increasing? (2 of 50, 3 of 50, etc..)

In my application, I’m closing the HttpResponse InputStream to indicate I’ve finished
with the connection. Should I be doing anything else/more?

Thanks,

GTG
-- 
Gordon Ross,
UIS Telecoms Office,
University of Cambridge

Mime
View raw message