Hi folks,

I've written an ldap server load testing tool using Net::LDAP, and I'm getting an odd (and inconsistent) error:

"LDAP_SASL_BIND_IN_PROGRESS" is not exported by the Net::LDAP::Constant module at /usr/lib/perl5/site_perl/5.8.0/Net/LDAP/Bind.pm line 8
Can't continue after import errors at /usr/lib/perl5/site_perl/5.8.0/Net/LDAP/Bind.pm line 8
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.0/Net/LDAP/Bind.pm line 8, <DATA> line 414.
Compilation failed in require at /usr/lib/perl5/site_perl/5.8.0/Net/LDAP.pm line 294, <DATA> line 414.


I'm running Net::LDAP v0.29, and perl 5.8.0 + MAINT18379, on linux 2.4.21 (with some kernel patches to make my laptop hardware work correctly).

Here's what the code does:

It spawns a (configurable) number of children, each of which will search using a single filter one or more times (depending on configuration). Each child then creates a new NET:LDAP and binds either once per process, or once per search operation (again, depending on configuration). Each child writes a logfile with a lot of timing information. When all the children are dead, the parent wakes up, parses all of it's dead children's logfiles, and writes a summary report.

All that works perfectly, when I'm spawning small (>100) children. Above that, things get wierd. At some point (different from run to run), the above error starts to be generated. It's quite possible I'm running into an OS imposed, or shell imposed limit on file descriptors, sockets, or some such, but running as root doesn't seem to improve the situation.

Regardless of configuration, the binds are done using this subroutine:

sub ldap_bind {
   my $LOGFILE = $_[0];
   my $ldap = $_[1];# Reference to Net::LDAP object
   my $bindtime; #Timing variable
   my $starttime = gettimeofday();#Declare variable, and start timer
   my $mesg;

   $mesg = $$ldap->bind($binddn, password => $bindpw);
   $bindtime =  (gettimeofday()) - $starttime;

   print $LOGFILE "Bind As: $binddn\n";
   print $LOGFILE "Bind Password: $bindpw\n";
   print $LOGFILE "Bind Message: ". $mesg->error ."\n";
   print $LOGFILE "Bind Time: $bindtime\n";

#Debug
if ($main::options{D}) {
print STDERR "PID: $$\n".
"Bind Message: ".$mesg->error ."\n".
"Bind DN = ". $binddn ." | Bind Password= ". $bindpw ."\n";
} # if ($main::options{D})


}# sub ldap_bind

I'll be happy to mail the full code (724 lines) and a sample config (64 lines or so) to anyone who thinks they can help.

--
Brendan E. Quinn                        Unix Project Engineer
[EMAIL PROTECTED]                       London Business School
+44 (0)20 7000 7775                     Sussex Place, London NW1 4SA




Reply via email to