[python-ldap] Multiple timeout values in python-ldap, which ones are applicable

varun mittal vmittal05 at gmail.com
Tue Apr 6 01:45:47 EDT 2021


>  I think you may want OPT_TIMELIMIT to limit the search time, rather than
OPT_TIMEOUT.

Oh , the documentation says TIMELIMIT is deprecated in favour of TIMEOUT


On Tue, Apr 6, 2021 at 6:48 AM William Brown <william at blackhats.net.au>
wrote:

>
> > On 18 Mar 2021, at 18:26, varun mittal <vmittal05 at gmail.com> wrote:
> >
> > I am using python-ldap==3.1.0 with python3 to query my AD server.
> >
> > With the following timeout values:
> >
> > ldap.set_option(ldap.OPT_NETWORK_TIMEOUT, 30)
> > ldap.set_option(ldap.OPT_TIMEOUT, 120)
> > conn = ldap.initialize(ldap://server-ip)
> >
> > Using 3 types of queries - synchronous search_s(), asynchronous with and
> without paging search_ext()
> >
> > I am not using any timeout in the _ext method.
> >
> > One of my LDAP searches(asynchronous with paging) took about 14 minutes
> to complete, in the customer environment. Eventually, the search was
> successful.
>
> I think you may want OPT_TIMELIMIT to limit the search time, rather than
> OPT_TIMEOUT.
>
> As well, because you are doing this as async with paging, there may be
> other timing interactions here that could be subtle and interacting.
>
> Hope that helps a bit
>
> >
> > Looking at the documentation, I am not sure which timeout value would be
> applicable here.
> >
> > I thought setting OPT_TIMEOUT should suffice for all kinds of searches.
> >
> > What am I missing here?
> > _______________________________________________
> > python-ldap mailing list
> > python-ldap at python.org
> > https://mail.python.org/mailman/listinfo/python-ldap
>
> --
> Sincerely,
>
> William
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/python-ldap/attachments/20210406/9a650e93/attachment.html>


More information about the python-ldap mailing list