hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From feedly team <feedly...@gmail.com>
Subject Re: connection leak
Date Sat, 25 Jun 2011 20:50:20 GMT
I think I found the issue. An exception is thrown by EntityUtils.toString():

java.io.UnsupportedEncodingException:
        at
sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:52)
        at java.io.InputStreamReader.<init>(InputStreamReader.java:83)
        at org.apache.http.util.EntityUtils.toString(EntityUtils.java:194)
        at org.apache.http.util.EntityUtils.toString(EntityUtils.java:221)
        at com.devhd.feedly.util.UrlReader.fetch(UrlReader.java:185)

This happens when constructing the reader, which is not surrounded by a try
finally block that would close the instream in case of an exception.

Thanks.

On Fri, Jun 24, 2011 at 11:23 PM, feedly team <feedlydev@gmail.com> wrote:

> Sorry, what does that message look like? I didn't see anything that looked
> like IDs in the log (I have logs set up for 'connection management /
> request
> execution'. I see messages like "Creating new connection [HttpRoute[{}->
> http://www.google.com]]" or "Releasing connection [HttpRoute[{}->
> http://feeds.feedburner.com]][null]" but nothing with IDs. Thanks.
>
> On Sun, Jun 19, 2011 at 3:41 PM, Oleg Kalnichevski <olegk@apache.org>wrote:
>
>> On Sun, 2011-06-19 at 15:10 -0400, feedly team wrote:
>> > any ideas where to go from here? I am not sure how to debug this
>> further.
>> >
>>
>> Each HTTP connection should carry a unique ID (a simple integer count).
>> You can see in the log when a particular connection gets leased from the
>> pool and whether it ever gets released back. This should give you enough
>> information to find out where your code leaks connections.
>>
>> Oleg
>>
>>
>> > On Fri, Jun 3, 2011 at 1:10 AM, feedly team <feedlydev@gmail.com>
>> wrote:
>> >
>> > > After turning on logging, the total issued in this message keeps
>> growing
>> > > and growing:
>> > >
>> > >
>> org.apache.http.impl.conn.tsccm.ConnPoolByRoute.getEntryBlocking[FINE|feed-processor-16|21:46:47]:
>> > > [HttpRoute[{}->http://img.ffffound.com]] total kept alive: 240, total
>> > > issued: *160*, total allocated: 400 out of 400
>> > >
>> > > Today it started at 100 and is now 160. the day before it started at
>> 30 and
>> > > ended at 100.
>> > >
>> > > There is actually one more method I use httpclient within, it is a
>> little
>> > > more complex but still very similar to my other code in its usage of
>> > > httpclient. It is below.
>> > >
>>
>>
>> ---------------------------------------------------------------------
>> 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