cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: freeing system resources when forgot to use curl_close

From: Corey Tisdale <corey_at_shopperschoice.com>
Date: Wed, 6 Dec 2006 10:25:41 -0600

I've had horrible luck with curl through iis because of thread
safety, and I think apache for windows is multi-thread like iis. I
solved my problem by making any script that has to use curl run under
a different extension, and load that up as a pure cgi call instead of
a filter or mod_php in your case. Those scripts are a tad slower to
run, but they work well enough. I hope that helps

Corey

On Dec 5, 2006, at 10:53 PM, Bush, Noel wrote:

> I wrote a small PHP script that uses curl_exec but (very stupidly)
> failed to use curl_close. After leaving it running for several
> days, it
> seems now that the script runs very slowly, even if the apache process
> is restarted. I have corrected the script to use curl_close now, but
> the problem persists. If I remove the part that's using curl (and try
> an HTTP connection to the resource in a different way), I don't see
> the
> problem. If I set a timeout using curl_set_opt, then I can control
> execution time, but the curl session doesn't manage to return
> anything.
>
> Is it possible that the resources associated with the handle I was
> creating each time are "stuck" somewhere, and that I need to do
> something drastic to free them up? I'm really at a loss here.
>
> Thanks for any thoughts....
>
> Noel
>
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2006-12-06