Hello,

I am getting few sockets hangs in SSL handshaking. I am using curl multi
interface for HTTP protocol.

Curl logs:
==============
08:05:04.208 == Info: Found bundle for host xyz.com: 0x11adaa0
08:05:04.208 == Info: About to connect() to xyz.com port 443 (#2731)
08:05:04.208 == Info:   Trying 205.251.243.193...
08:05:04.208 == Info: Adding handle: conn: 0x4dcf8a0
08:05:04.208 == Info: Adding handle: send: 0
08:05:04.208 == Info: Adding handle: recv: 0
08:05:04.208 == Info: Curl_addHandleToPipeline: length: 1
08:05:04.208 == Info: - Conn 1821 (0x1989e30) send_pipe: 0, recv_pipe: 1
.
.    //some printing for more connections
08:05:04.208 == Info: - Conn 2731 (0x4dcf8a0) send_pipe: 1, recv_pipe: 0
08:05:05.578 == Info: Connected to xyz.com (205.251.243.193) port 443
(#2731)
08:05:05.588 == Info: successfully set certificate verify locations:
08:05:05.588 == Info:   CAfile: /some_location/cacert.pem
08:05:05.588 == Info: SSL re-using session ID
08:05:05.588 == Info: SSLv3, TLS handshake, Client hello (1):
08:05:05.588 => Send SSL data, 0000000125 bytes (0x0000007d)

*At this point particular easy handle hanged until I call
curl_multi_cleanup. We can have a look at time in logs.*

13:33:11.147 == Info: Closing connection 2731
==============

Observation
==============
I am getting this intermittently.
I have made ~45000 connections, each of 1MB and max100 connections at a
time. I can see that among these many connections only 1 or 2 of them hangs
like this, all others work fine.
Curl shows me socket fd is there but select() call give me a timeout. So
even I am not able to get out from the loop.
==============

I have set CURL_CONNECTION_TIMEOUT to 5 minutes and CURL_TIMEOUT to 15
minutes. The strange thing is it not even giving me timeout error.

Information for your assistance:
========================
Platform - SuSE 64 bit
libcurl version - 7.33
Interface - libcurl multi interface
OpenSSL version - 0.9.8

Kindly help me to resolve this and let me know if you need anything else
from my side.

-- 
Thanks and Regards,
Sachin Dravid
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to