hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: slowly losing threads (httpclient-2.0.1)
Date Mon, 24 Jan 2005 22:55:58 GMT
Julius,

As you can see HttpClient blocks in the native socket read call. The
only thing that can possibly explain this behavior is zero (indefinite)
socket read timeout. Make sure you set the socket read timeout to a
positive value

> "Thread-8" prio=1 tid=0x081d38b8 nid=0x75ff runnable 
> [bdbff000..bdbff908]
>         at java.net.SocketInputStream.socketRead0(Native Method)
> 

Hope this helps

Oleg

On Mon, 2005-01-24 at 11:28 -0800, Julius Davies wrote:
> httpclient-2.0.1
> 
> I'm running an application that uses "HttpClient.executeMethod()" about
> once every 5 minutes.  In 4 weeks of usage the executeMethod() has hung,
> completely, on two occasions, requiring a restart of the JVM.
> 
> In the thread-dump (kill -3), this looks suspicious to me:
> 
> "Thread-8" prio=1 tid=0x081d38b8 nid=0x75ff runnable [bdbff000..bdbff908]
>         at java.net.SocketInputStream.socketRead0(Native Method)
>         at java.net.SocketInputStream.read(SocketInputStream.java:129)
>         at java.net.SocketInputStream.read(SocketInputStream.java:182)
>         at java.io.FilterInputStream.read(FilterInputStream.java:66)
>         at java.io.PushbackInputStream.read(PushbackInputStream.java:120)
>         at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:77)
>         at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:103)
>         at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1062)
>         at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:2163)
>         at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1924)
>         at org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMethodBase.java:2634)
>         at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1065)
>         at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:643)
>         at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:497)
>         at com.cucbc.ucp.HttpDispatcher.run(HttpDispatcher.java:114)
>         at java.lang.Thread.run(Thread.java:534)
> 
> 
> Any ideas?
> 
> 
> yours,
> 
> Julius
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message