cURL / Mailing Lists / curl-library / Single Mail

curl-library

Unable to get curl handle

From: Monica Lau <mllau2004_at_yahoo.com>
Date: Wed, 5 May 2004 11:23:05 -0700 (PDT)

Hi all,

I wrote a test program that opens a curl handle, sends a HTTP request to a web server, and then closes the curl handle. This operation is performed 20 times per second. It ran for over a week successfully, but suddenly, it core dumped on me yesterday. I checked the log messages, and it said that it cannot get a curl handle. Unfortunately, the test program is quite large and includes other processing as well, so I cannot attach the whole program here. However, I've taken the curl snippet and posted it below. Does anyone know why the process fails to get a curl handle? Is this a memory issue or a file handle issue? How can I go about to figure this out?

Thanks in advance for all your help. I appreciate your time and help.

Regards,
Monica

 

CURL *curl_handle;
CURLcode curlErrorCode;
char curlErrorBuffer[CURL_ERROR_SIZE];
curl_handle = curl_easy_init();

if (curl_handle)
{
curl_easy_setopt(curl_handle, CURLOPT_URL, HTTPRequestStr.c_str());
curl_easy_setopt(curl_handle, CURLOPT_ERRORBUFFER, curlErrorBuffer);
curlErrorCode = curl_easy_perform(curl_handle);
curl_easy_cleanup(curl_handle);
}
else
{
cout << "Cannot get curl handle" << endl;
}

                
---------------------------------
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
Received on 2004-05-05