curl-and-php
RE: freeing system resources when forgot to use curl_close
Date: Wed, 6 Dec 2006 09:31:53 -0500
Another clue: If I use command line curl to make a request to the
"problem" URLs using IP addresses instead of hostnames, I get a response
right away. So this makes me think it's even more likely that there's
some cache or connection pool that's filled with objects associated with
those URLs that isn't getting cleaned up, even when the apache process
is restarted. Possible? And is there any way to empty that cache,
short of getting someone to restart all apache processes or restarting
the machine?
Thanks again!
Noel
-----Original Message-----
From: curl-and-php-bounces_at_cool.haxx.se
[mailto:curl-and-php-bounces_at_cool.haxx.se] On Behalf Of Bush, Noel
Sent: Wednesday, December 06, 2006 7:59 AM
To: curl with PHP
Subject: RE: freeing system resources when forgot to use curl_close
Originally, I was not using the "Connection: close" header when creating
the curl objects. Now, even with the command line version of curl, if I
request one of the URLs I was using in the script, it takes a very long
time and then finally returns with an error code 7. But using curl to
any other URL from that machine gets a response immediately. Also,
requesting one of the "problem" URLs from another machine gets an
immediate response. So I'm wondering if, somewhere, there is a cache of
connections that isn't getting cleared out, even when apache is
restarted. I don't have control of the machine I'm using, so I can't
fully restart it or restart other apache instances there. So I'm really
at a loss about what might be happening. Is it possible that all uses
of libcurl would be accessing some shared pool where they're storing
connections, and that that wouldn't go away until (in this case) all
apache instances were restarted, because of the way the PHP binding
works?
-----Original Message-----
From: curl-and-php-bounces_at_cool.haxx.se
[mailto:curl-and-php-bounces_at_cool.haxx.se] On Behalf Of Daniel Stenberg
Sent: Wednesday, December 06, 2006 5:02 AM
To: curl with PHP
Subject: Re: freeing system resources when forgot to use curl_close
On Tue, 5 Dec 2006, Bush, Noel wrote:
> 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.
libcurl itself has no known memory leaks in recent versions, so closing
it
properly frees all resources it used.
I can't tell about the PHP/CURL binding parts. Now how do you
measure/know
that the resources are "stuck" ?
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.html _______________________________________________ http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php _______________________________________________ http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php _______________________________________________ http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-phpReceived on 2006-12-06