cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Windows RPC server busy. Libcurl Multithreading issues.

From: Michael Mastroianni <MMastroianni_at_choicestream.com>
Date: Tue, 18 Jan 2005 08:33:07 -0500


You have to explicitly use Ares if you want it (or at least you did in 7.12.0, which is the version I'm using at work).

What I mean by blowing up in gethostbyname is just that: I would consistently get access violations there when running a lot of threads, when I ran under the debugger.

I dusted off my thread test, built it against the latest curl and ran it just now on 10000
urls using 200 threads a few times, so I think the problem is probably somewhere in your code.

With 7.12.0, not using Ares, it would blow up every time.

If you want, I can send you a copy of it so that you might be able to troubleshoot better.

regards,
Michael

-----Original Message-----
From: curl-library-bounces_at_cool.haxx.se on behalf of Jim N
Sent: Mon 1/17/2005 1:03 PM
To: libcurl development
Subject: RE: Windows RPC server busy. Libcurl Multithreading issues.
 
Thanks for responding.

I thought Ares was already used in libcurl...

What do u mean "blowing up in gethostbyname?"

My code doesn't blow up. It just causes a firsttime exception and moves
on (but I need it to be succesful with no RPC busy exceptions)

I just know that it happens in the line "curl_easy_perform(curl)" (the
actual lookup) since when I comment this out the error goes away.

The debugger shows some error in some heap allocation/deallocation routine.

Ideas?


>
> I had a similar issue. I was always blowing up in gethostbyname.
>
> I switched to using Ares for dns lookups, and the problem went away.
>
>
> -----Original Message-----
> From: curl-library-bounces_at_cool.haxx.se on behalf of Jim N
> Sent: Mon 1/17/2005 12:13 AM
> To: curl-library_at_cool.haxx.se
> Subject: Windows RPC server busy. Multithreading issues.
>
> Hello everyone!
>
> I hope everyone is having a fine day, and best of care to the tsunami
> victims.
>
> On a lesser but important note, I am working on a Windows C program that
> uses the curl library. I am currently using the easy interface, and it
> seems to do a very good job.
>
> My problem is that I am also using multithreading and when I have a lot
> of
> threads open (40-100 or so) it causes the following message to show in
> the
> debugger: "First-chance exception at 0x77e6d756 in Program.exe:
> 0x000006BB: The RPC server is too busy to complete this operation."
>
> I am using Microsoft Visual C++ as my IDE and programming my project in
> Win32 using just "C". When I comment out the line
> "curl_easy_perform(curl)" the error disappears so I know it has something
> to do with curl looking up the url. This error occurs maybe 20% of the
> time a thread executes. Sometimes it works, sometimes it doesn't.
>
> I've tried setting CURLOPT_NOSIGNAL to true for all threads but that
> didn't work. I also did a CURLOPT_VERBOSE to see all the debug
> information but it didn't help any. I am not sure what is going on but
> it
> has something to do with all the threads open.
>
> I am using the latest version of curl, 7.12.3, running WinXP, and using
> Microsoft Visual Studio .NET 2003 (just Win32).
>
> If anyone knows a solution or anything about this I would appreciate it.
>
>
>


Received on 2005-01-18