cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl hangs in SSL handshake

From: sachin dravid <sachin.dravid1_at_gmail.com>
Date: Tue, 14 Jan 2014 12:34:18 +0530

On Mon, Jan 13, 2014 at 10:29 PM, sachin dravid <sachin.dravid1_at_gmail.com>wrote:

>
> On Mon, Jan 13, 2014 at 8:52 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
>
>> On Mon, 13 Jan 2014, sachin dravid wrote:
>>
>> I am getting few sockets hangs in SSL handshaking. I am using curl multi
>>> interface for HTTP protocol.
>>>
>>
>> I'm not sure I understand your definition of "hang" here.
>>
>
> Actually the sockets are not getting any activity. So exactly my process
> has not hung but I need a socket activity to take an action.
>

This issue is almost similar to

http://curl.haxx.se/mail/lib-2008-04/0276.html

<http://curl.haxx.se/mail/lib-2008-04/0276.html>

>
>> Are you referring to a socket that libcurl "owns" that you won't get any
>> notifications about activities on, possibly because libcurl hasn't given
>> you the correct bits to check?
>
>
> I am not sure that socket fd is wrong, because if so than select() should
> have return an error instead timeout. But if you can suggest me any
> mechanism to check that I can share the results.
>
>>
>>
>> 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.
>>>
>>
>> That does indeed sound bad, but I've not seen it happen. We even have
>> test cases to verify connect timeouts during a very slow SSL connect so I
>> think it generally works.
>>
>
> This scenario is not something with slow network because here the process
> has uploaded ~450GB in ~4 hours. Only 2 of my easy handles got such issue.
>
>>
>> But unless you can provide a recipe for us, I'm not sure what I can do
>> about this...
>>
>
> I can understand this is something tricky :). How/what more can I share
> with you?
> Did you get anything with logs?
> Another observation is this issue is coming only with SSL only.
> Can large number of easy interfaces be an issue? (10 processes each
> running 100 easy interfaces in parallel)
> Also I am reusing the connections, can this be a problem?
>
> If you can give me any pointer, I can share the code/logs around that.
> Kindly help me here as I am stuck in this issue since long time.
>
> Thanks and Regards,
> -Sachin
>
>
>> --
>>
>> / daniel.haxx.se
>> -------------------------------------------------------------------
>> List admin: http://cool.haxx.se/list/listinfo/curl-library
>> Etiquette: http://curl.haxx.se/mail/etiquette.html
>>
>
>
>
> --
> Thanks and Regards,
> Sachin Dravid
>

-- 
Thanks and Regards,
Sachin Dravid

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-01-14