From: Graham B. <gb...@po...> - 2003-01-06 17:36:18
|
On Mon, Jan 06, 2003 at 01:25:46PM +0000, Stephen Brandon wrote: > To fix this for the time being, after getting the Connection Reset error I > (i) call $ldap->unbind, and (ii) close $ldap->socket() > > This seems to stop the file descriptor problem, but I am concerned that there > may be a larger scale memory leak going on. If closing the socket explicitly is solving the problem of leaked fd's then that does indicate that there is a bigger problem. Somewhere something is holding a reference to the socket, or Net::LDAP object. > - Can anyone shed any light on this? Doing a Data::dumper of the Net::LDAP object where you are currently doing the close would show if there were any internal circular references. If there is not then it must be something outside of Net::LDAP that is holding that reference. > - Should there be some other method in perl-ldap that does a more thorough, > explicit cleanup? That would not really help. If there is something holding a reference to the Net::LDAP object, you have a leak no matter how good Net::LDAP is being. Graham. |