Skip to content

Operation timed out after 0 milliseconds with 0 out of 0 bytes received #619

@dan-cristian

Description

@dan-cristian

I use CURL to perform upload/download operations via HTTP from an openstack Swift server (www.hubic.com).

I get random errors "Operation timed out after 0 milliseconds with 0 out of 0 bytes received" both on HTTP PUT and GET operations. After several retries it will eventually work.
The message seems to be incorrect as the timeout is set to 20 ms.
Can someone confirm if this timeout occurs in the SSL handshake? If yes, are there any other curl flags I can use to increase connection reliability?

The code excerpts and some debug data can be found below.

Code extras
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_HEADER, 0);
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0);
curl_easy_setopt(curl, CURLOPT_USERAGENT, USER_AGENT);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 1);
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 20);
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
curl_easy_setopt(curl, CURLOPT_TCP_NODELAY, 1);
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1);
curl_easy_perform(curl);

Debug output
CURL version=7.38.0 ssl=OpenSSL/1.0.1k
[2016-01-27 23:18:37.]:26085==adding extra header: X-Copy-From: /default_fuse_segments/default/test/t2_segments/medium.txt/1453929407.883449/00000003
[2016-01-27 23:18:37.]:26085==adding extra header: Content-Length: 0

  • Hostname was found in DNS cache
  • Trying 46.105.173.106...
  • TCP_NODELAY set
  • Connected to lb1.hubic.ovh.net (46.105.173.106) port 443 (Change cnonce values more frequently #50)
  • successfully set certificate verify locations:
  • CAfile: none
    CApath: /etc/ssl/certs
  • SSL re-using session ID
  • Operation timed out after 0 milliseconds with 0 out of 0 bytes received
  • Closing connection 50

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions