[PHP] Memory leaks with LDAP?

2001-11-29 Thread Darren Gamble

Hey all,

Has anyone else had problems with memory leaks using PHP's LDAP functions?

I put together a LDAP server the other day, and wrote a PHP program to test
it.  I've stripped this program down to basically a ldap_connect, ldap_bind,
ldap_search on objectclass=* , ldap_get_entries, ldap_free_result and
ldap_unbind.  There are about 8k entries in the DB which is a bit under
10MB, but with each iteration of the program, about 100MB of memory is
leaked to httpd!  The program doesn't have to be run many times before the
server stops responding.

I note errors in the apache log indicating that it can not kill off its
children.  And, /etc/init.d/httpd stop needs to be called exactly twice to
stop the web process after the program is run.

I'm running php-4.0.6-7 as a module for apache-1.3.20-16; all Redhat 7.2
RPMs.

I posted a message on the PHP bug page recently, but, by reading the posting
guidelines on that page it seems that there is a good chance that no one
will even look at it.  I'm hoping that someone on this list has encountered
something similar and would be able to share their resolution.

Thanks to all who respond!


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Memory leaks with LDAP?

2001-11-29 Thread Stig Venaas

On Thu, Nov 29, 2001 at 09:38:19AM -0700, Darren Gamble wrote:
 Hey all,
 
 Has anyone else had problems with memory leaks using PHP's LDAP functions?

Yes

 I'm running php-4.0.6-7 as a module for apache-1.3.20-16; all Redhat 7.2
 RPMs.
 
 I posted a message on the PHP bug page recently, but, by reading the posting
 guidelines on that page it seems that there is a good chance that no one
 will even look at it.  I'm hoping that someone on this list has encountered
 something similar and would be able to share their resolution.

I'm trying to keep track of all LDAP related reports. If yours haven't
been attended to, please give me the report number.

A number of leaks have been fixed recently, could you test with a recent
snapshot from snaps.php.net (or CVS)? I think the fixes will be in 4.1.0
as well, you might test it (or one of the RCs) when it's released
shortly. If you still see leaks, please mail me a shortest possible
script that demonstrates the problem.

Stig

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]