Hi,

I see a problem with curl_easy_perform() seemingly stalling mid-operation.

What I do is an HTTP(S) PUT to an S3-like backend, in a manner roughly like this


setup_handle();

do {
  curl_easy_perform();

  if (success)
    break;

  rewind_data();

  sleep();
} while(n_retries++ < max_retries);


Fairly often it times out. That is after all data has been written to the socket. With the verbose flag set, curl tells me we are completely uploaded and fine. The server has received the data - I can get the keys and check them. This happens with and without using the 100-continue header.

I just never see the 200 OK. Normally I would start looking at the server side, but using boto or Node sdk's, I don't see this problem at all.

Also, the server only allows HTTPS, so I can't easily just listen to network traffic and see what is sent.

- Is there a chance that libcurl simply misses the 200 OK response from the server?
- If so,
  - what can I have done to cause it?
  - what can I do to verify it?
  - how can I resolve it?


Things I have tried:

- Using/not using Expect: 100-continue
- Cleaning up the handle and getting a new one each retry
- Not cleaning up the handle and getting a new one
- Setting/omitting flags like CURLOPT_FRESH_CONNECT, CURLOPT_FORBID_REUSE, CURLOPT_MAXCONNECTS


For compatibility reasons, most likely we will need to run an old libcurl 7.19.7 and openssl 1.0.1e in production. Currently I am using 7.35.0/1.0.1f on my dev machine.


Thanks!

Daniel

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html

Reply via email to