You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Abraham Cabanillas (Jira)" <ji...@apache.org> on 2021/04/19 07:19:00 UTC

[jira] [Created] (HTTPCLIENT-2153) I/O reactor shutdown when endpoint is closed

Abraham Cabanillas created HTTPCLIENT-2153:
----------------------------------------------

             Summary: I/O reactor shutdown when endpoint is closed
                 Key: HTTPCLIENT-2153
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2153
             Project: HttpComponents HttpClient
          Issue Type: Bug
          Components: HttpClient (async)
    Affects Versions: 5.1-beta1, 5.0.3
            Reporter: Abraham Cabanillas
         Attachments: httpclient_error_traces.txt

I am using async http client for real time bidding project in a cluster of servers. Each server execute around 6K request per second and sometimes each server restarted becase I/O reactor is shutdown. It seems that there is a race condition in the code that produces this behavior.

It seems that the race condition appears between this method:

{{org.apache.hc.client5.http.impl.async.AsyncConnectExec$1.completed()}}

and this method:

{{org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager$InternalConnectionEndpoint.setSocketTimeout()}}

because in the first method the endpoint is connected but in the second one this code fails:

 
{code:java}
// marcador de posición de código
{code}
ManagedHttpClientConnection getValidatedConnection() \{    final ManagedHttpClientConnection conn = getConnection();    Asserts.check(conn.isOpen(), "Endpoint is not connected");    return conn; }

 

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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