cURL / Mailing Lists / curl-library / Single Mail

curl-library

intermittent http put issue

From: Bill Hoffman <bill.hoffman_at_kitware.com>
Date: Thu, 11 Jun 2009 11:58:04 -0400

I am hoping someone might be able to point me in the right direction for
how to debug an odd problem I am having. The CMake project uses curl
for a continuous integration testing system that is built with two
parts. A C++ tool called CTest, and a LAMP stack web application called
CDash. CTest uses curl to http put, something like this:

   curl_easy_setopt(curl, CURLOPT_UPLOAD, 1) ;
    ::curl_easy_setopt(curl, CURLOPT_PUT, 1);
   ::curl_easy_setopt(curl,CURLOPT_URL, upload_as.c_str());
    ::curl_easy_setopt(curl, CURLOPT_INFILE, ftpfile);
   ::curl_easy_setopt(curl, CURLOPT_INFILESIZE,
         static_cast<long>(st.st_size));
    res = ::curl_easy_perform(curl);

This gets sent to a php program in CDash:
http://www.cdash.org/CDash/submit.php?project=CMake

Now, this works 99.9% of the time. However, once in a while curl just
hangs forever and the process does not stop. Any ideas on what would
cause that? If I add a global timeout it will stop it. However, since
I do not know how long it should take to send a file to the server, I am
hesitant to pick a number. Is there some sort of timeout based on
response from the server? Any ideas on how to debug would be helpful?

Thanks.

-Bill
Received on 2009-06-11