Hello,
I'm using your product for an application that we're building (that fetches some
HTTP content) and I'm running into an issue where it isn't timing out and was
wondering if anyone else has seen this before? I've looked through the
FAQ's/Intros/and archives to this list, but haven't quite seen this exact issue
discussed. I know that Java, sockets, and the whole HTTP Conncetion
functionality has some difficulties, so I appreciate any assistance.
Basically, we're making an HTTP connection like this (code shown below), and
seeing it hang occasionally on socketRead() (as shown in the thread dump below)
-- anyone know if there is any way we can avoid this and have it not hang
permanantly (it hands until we kill the thread)? We're using JDK 1.3.1_08,
Solaris 2.8, and 2.0-rc1of the http client.
----------This is how we're connecting -----------------
HttpClient client = new HttpClient();
client.setConnectionTimeout (connectionTimeout * 1000);
client.setTimeout (transferTimeout * 1000);
HttpMethod method = new GetMethod(url);
try {
statusCode = client.executeMethod(method);
}
catch (java.net.UnknownHostException e) {
//set some status code that we failed
...
}
catch (HttpConnection.ConnectionTimeoutException e)
{
//set some status code that we failed
...
}
catch (HttpRecoverableException e)
{
//set some status code that we failed
...
}
catch (IOException e)
{
//set some status code that we failed ...
}
-------------This is our thread dump where it isn't timing out ---------------
"Stack Trace, DRPThread" prio=5 tid=0x1f1be68 nid=0x9f22c runnable
[0xa2c79000..0xa2c7fc68]
at java.net.SocketInputStream.socketRead(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:85)
at java.net.SocketInputStream.read(SocketInputStream.java:107)
at java.io.FilterInputStream.read(FilterInputStream.java:64)
at java.io.PushbackInputStream.read(PushbackInputStream.java:118)
at
org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:109)
at
org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:135)
at
org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1062)
at
org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:2095)
at
org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1876)
at
org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMethodBase.java:2536)
at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1047)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:638)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:500)
at cmp.shared.net.HttpGet.getContent(HttpGet.java:244)
Thanks!!!
__________________________________________________________________________________________
Any views or opinions are solely those of the author and do not necessarily
represent those of CMP Media.
The information transmitted is intended only for the person or entity to which
it is addressed and may contain confidential and/or privileged material. If you
are not the intended recipient of this message please do not read, copy, use or
disclose this communication and notify the sender immediately. It should be
noted that any review, retransmission, dissemination or other use of, or taking
action or reliance upon, this information by persons or entities other than the
intended recipient is prohibited.
__________________________________________________________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]