huge memory usage in PHP 4.0.2 object programming?
| From: | vincent at aib dot net | Date: | Sat, 16 Sep 2000 03:53:06 +0000 |
| Subject: | huge memory usage in PHP 4.0.2 object programming? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-17007@lists.php.net to get a copy of this message | ||
Hello,
I'm writting a program using PHP4's object feature. However after each run I found that
the apache process hold up
70M of the memory!!! In the 2nd run however it doesn't make the apache process grow to 140M,
remain 70M.
The program read 2000 records into 2000 objects from a mysql database and do some processing to
produce another
2000 objects for later use (It hasn't finish). Is PHP4 will not release memory for objects, or
rather this is an apache problem?
I add unset() to the final produced objects seems still doens't free up the memory after the
run.
Thanks for your help! Please reply a copy to my e-mail if possible!
Vincent
========================================================
Brief of the enviornment:
- Debian 2.1 with Linux kernel 2.0.38
- Apache 1.3.12 with PHP 4.0.2 running as a apache static module
- PHPLib 7.2b used in db object
Main object types:
- db object: read records from mysql database
- object A: source object type
- object B: destination object type
- factory object: translate object A to object B
Brief of the program:
1) db object reads 2000 object A from a mysql database and put them into an array inside the factory
object.
2) the factory object produce 2000 object B use the 2000 object A from the array.