hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Timeout exception caused by http 500 error
Date Fri, 04 Jan 2013 14:49:33 GMT
On Fri, 2013-01-04 at 22:35 +0800, Chi Shin Hsu wrote:
> I'm trying using fluent client, but getting a strange issue.
> 
> Here is the pseudo code
> -----------------------------------------
> public String get(String url) throw Exception
> {
>    return .Get("http://somehost/")
>         .connectTimeout(1000)
>         .socketTimeout(1000)
>         .execute().returnContent().asString();
> }
> 
> int main()
> {
>    try
>    {
>    get("urlA");
>    }
>    catch(Exception e)
>            e.printstack();
> 
>     try
>    {
>    get("urlB");
>    }
>    catch(Exception e)
>            e.printstack();
> 
> }
> -------------------------
> Here is the problem
> 
> If I enter the first get function, get a http 500 exception.
> Then get urlB , it would block until the socket timeout, and throw a
> timeout exception.
> 
> urlB can be executed in front of urlA
> 
> Moreover, I traced the flow by wireshark.
> The server actually send a response by urlB, but it still caused timeout
> exception
> any solution?
> 
> Thanks.

Generate a wire / context log of the session as described here [1] and
post it to this list.

Oleg

[1] http://hc.apache.org/httpcomponents-client-ga/logging.html




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message