You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (JIRA)" <ji...@apache.org> on 2019/08/13 18:19:00 UTC

[jira] [Resolved] (HTTPCLIENT-2010) SSL handshaking taking lot of time in createLayeredSocket in SSLConnectionSocketFactory

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-2010?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCLIENT-2010.
-------------------------------------------
    Resolution: Invalid

[~guptakeshav24] Socket timeout defines the longest period of inactivity between two consecutive network events (packets). It is not an absolute value or a deadline.

Oleg 

> SSL handshaking taking lot of time in createLayeredSocket in SSLConnectionSocketFactory
> ---------------------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-2010
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2010
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>    Affects Versions: 4.5.9
>            Reporter: Keshav Gupta
>            Priority: Major
>
> I am seeing SSL handshaking taking lot of time. 
> Time difference between following log messages in SSLConnectionSocketFactory in connectSocket is greater than soTimeout set.
> {code:java}
> "Starting handshake"{code}
> and
> {code:java}
> "Secure session established"  {code}
> {code:java}
> if (connectTimeout > 0 && sock.getSoTimeout() == 0) { sock.setSoTimeout(connectTimeout); }
> {code}
> connectTimeout set is 5000.
>  
> SoTimeout set is as follows :
> {code:java}
> PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(); connectionManager.setMaxTotal(properties.getHttpMaxTotalConnections()); connectionManager.setDefaultMaxPerRoute(properties.getHttpDefaultMaxPerRoute()); final SocketConfig socketConfig = SocketConfig.custom().setSoTimeout(5000).build(); connectionManager.setDefaultSocketConfig(socketConfig);
>  {code}
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

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