[python-ldap] ldap.OPT_DESC, async ops and paged search controls

Michael Ströder michael at stroeder.com
Thu Jan 22 15:15:04 CET 2015


Mark R Bannister wrote:
> I can't use wireshark for this one because it's localhost. 

Usually I grab the trace with tcpdump in a raw pcap file and view it with
wireshark on my local workstation. Could you do that?

I'd be interested to see whether there's something like keepalive etc. which
wakes up select().

> However, truss
> works fine for me and demonstrates that each time ldap.result() is called it
> reads one entry from the fd, then returns [None, None]. 

But can truss also output what's transmitted on the network interface?

Could you also try to access slapd over ldapi:// ?

> If I run the second attached test script (testldap2.py) and run truss on that,
> I see the same behaviour under the covers - a poll() and a separate read() for
> each individual entry.  I haven't tried ldap.resiter, but I'm sure it's the
> same as it uses LDAPObject.result3().

But ldap.resiter internally blocks.

> Perhaps this is some tuning I've missed from OpenLDAP, which seems to want to
> drip-feed one result at a time ... or is this normal?  It seems quite
> inefficient to me.

Let me do some tests on my local system and then we see whether we should take
this over to openldap-technical mailing list.

Ciao, Michael.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4252 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20150122/2431ab06/attachment.bin>


More information about the python-ldap mailing list