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

curl-and-php

RE: freeing system resources when forgot to use curl_close

From: Bush, Noel <Noel.Bush_at_mtvnmix.com>
Date: Wed, 6 Dec 2006 07:58:30 -0500

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
Received on 2006-12-06