hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mauro Improta (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPASYNC-39) SocketTimeoutException occurs too soon
Date Tue, 18 Jun 2013 12:06:20 GMT

    [ https://issues.apache.org/jira/browse/HTTPASYNC-39?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13686624#comment-13686624
] 

Mauro Improta commented on HTTPASYNC-39:
----------------------------------------

I also suspected a race condition. My client is a singleton, so actually it could come to
such a problem.

Unfortunately I'm using the connection pooling, so don't directly handle a Connection nor
use a Handler.

But what I do is tight to the documentation. Please try to figure it out or tell me if my
description is patchy.

1. For each request I instantiate a NEW HttpAsyncRequester, passing a GLOBAL HttpProcessor,
a NEW DefaultConnectionReuseStrategy, and request parameters.
 The HttpProcessor (documented as thread safe) is composed by RequestContent, RequestTargetHost,
RequestConnControl, RequestUserAgent, RequestExpectContinue.
2. I call execute on it, with a NEW BasicAsyncRequestProducer, a NEW BasicAsyncResponseConsumer,
a GLOBAL BasicNIOConnPool (instantiated with a GLOBAL DefaultConnectingIOReactor, both documented
as thread safe), a NEW BasicHttpContext, a NEW Callback.

So, I don't directly handle the IOSession.
                
> SocketTimeoutException occurs too soon
> --------------------------------------
>
>                 Key: HTTPASYNC-39
>                 URL: https://issues.apache.org/jira/browse/HTTPASYNC-39
>             Project: HttpComponents HttpAsyncClient
>          Issue Type: Bug
>    Affects Versions: 4.0-beta3
>            Reporter: Clinton Nielsen
>
> In a highly concurrent environment, where SocketTimeout is set to 30,000 milliseconds,
we are often seeing a timeoutexception after only 0 or 1 or 2 milliseconds has actually passed.
> I get the impression that in the AbstractIOReactor timeoutCheck function, session.getLastAccessTime
is being called on the session before the lastAccessTime is set on the session for the current
session (ie. the lastAccessTime being retrieved is the time that was set on the session object
for the previous http session)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


Mime
View raw message