Home » HTTP » HTTP_Client » Bug #4807
High memory usage
Details
| Submitted | 2005-07-12 21:26 UTC |
|---|---|
| From | webjedi_on_crack at yahoo dot com |
| Status | Bogus |
| Package | HTTP_Client |
| PHP Version | 4.3.10 |
| OS | Linux 2.6.8-2-386 |
| Roadmaps | (Not assigned) |
Comments
[2005-07-12 21:26 UTC] webjedi_on_crack at yahoo dot com
Description:
------------
I have a long running HTTP client script, which retrieves several pages. The pages are fairly medium to large in size and quickly add up to using all of the PHP allocated memory. I modified the link-checker.php sample script to demonstrate the memory usage.
PEAR::Client version 1.0
no php.ini changes
Reproduce code:
---------------
By modifying the sample link-checker.php from line 86:
while (true) {
print ('Retrieving http://www.php.net...');
$client->get('http://www.php.net/');
print ('Memory usage: '.memory_get_usage()."\n");
sleep (5);
}
/*
foreach ($urlList as $url) {
$client->head($url);
}
var_dump($checker->getResults());
*/
Expected result:
----------------
$ php link-checker.php
Retrieving http://www.php.net...Memory usage: 539168
Retrieving http://www.php.net...Memory usage: 581560
Retrieving http://www.php.net...Memory usage: 624000
Retrieving http://www.php.net...Memory usage: 666440
Retrieving http://www.php.net...Memory usage: 708880
Retrieving http://www.php.net...Memory usage: 751320
Retrieving http://www.php.net...Memory usage: 793760
Retrieving http://www.php.net...Memory usage: 836200
Retrieving http://www.php.net...Memory usage: 878672
^C
[2005-07-13 06:55 UTC] webjedi_on_crack at yahoo dot com
Okay, cool! That helps a boat load! It'd be nice if this function is in doc. Thanks.