I am using openldap-2.4.39 on CentOS 7, to query my AD server, with python-ldap wrapper
I set the following scheme:
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 or the result3() methods
One of my python client LDAP searches(asynchronous with paging) took about 14 minutes to complete, in the customer environment. Eventually, the search was successful.
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.
And the strange thing is that the similar query, but synchronous( ldap_search_ext_s) from my C client failed within 120 seconds. This is the default AD server timelimit. The C application didn't specify any timeouts
What am I missing here?
Any inputs on this one ?
The client timeout parameter works for individual search page or the entire time period of the search, if there are multiple pages ?
On Fri, Apr 2, 2021 at 2:07 PM varun mittal vmittal05@gmail.com wrote:
I am using openldap-2.4.39 on CentOS 7, to query my AD server, with python-ldap wrapper
I set the following scheme:
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 or the result3() methods
One of my python client LDAP searches(asynchronous with paging) took about 14 minutes to complete, in the customer environment. Eventually, the search was successful.
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.
And the strange thing is that the similar query, but synchronous( ldap_search_ext_s) from my C client failed within 120 seconds. This is the default AD server timelimit. The C application didn't specify any timeouts
What am I missing here?
The timeout is a per-request timeout. Isn't doing paged requests explicitly about making multiple requests, with possibly semi-arbitrary delays by the client between them, but each of which therefore gets its own shot at the timeout?
Philip Guenther
On Thu, 15 Apr 2021, varun mittal wrote:
Any inputs on this one ?
The client timeout parameter works for individual search page or the entire time period of the search, if there are multiple pages ?
On Fri, Apr 2, 2021 at 2:07 PM varun mittal vmittal05@gmail.com wrote:
I am using openldap-2.4.39 on CentOS 7, to query my AD server, with python-ldap wrapper
I set the following scheme:
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 or the result3() methods
One of my python client LDAP searches(asynchronous with paging) took about 14 minutes to complete, in the customer environment. Eventually, the search was successful.
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.
And the strange thing is that the similar query, but synchronous( ldap_search_ext_s) from my C client failed within 120 seconds. This is the default AD server timelimit. The C application didn't specify any timeouts
What am I missing here?
The timeout is a per-request timeout. Isn't doing paged requests explicitly about making multiple requests, with possibly semi-arbitrary delays by the client between them, but each of which therefore gets its own shot at the timeout?
That is what I struggling with to find some clear documentation on this. Should the TIMEOUT value suffice, or I need to use TIMELIMIT with paged searching. Or use timeout values with search_ext() and result() APIs There are multiple timeouts at different levels.
On Fri, Apr 16, 2021 at 3:52 AM Philip Guenther pguenther@proofpoint.com wrote:
The timeout is a per-request timeout. Isn't doing paged requests explicitly about making multiple requests, with possibly semi-arbitrary delays by the client between them, but each of which therefore gets its own shot at the timeout?
Philip Guenther
On Thu, 15 Apr 2021, varun mittal wrote:
Any inputs on this one ?
The client timeout parameter works for individual search page or the
entire
time period of the search, if there are multiple pages ?
On Fri, Apr 2, 2021 at 2:07 PM varun mittal vmittal05@gmail.com wrote:
I am using openldap-2.4.39 on CentOS 7, to query my AD server, with python-ldap wrapper
I set the following scheme:
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 or the result3() methods
One of my python client LDAP searches(asynchronous with paging) took
about
14 minutes to complete, in the customer environment. Eventually, the
search
was successful.
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.
And the strange thing is that the similar query, but synchronous( ldap_search_ext_s) from my C client failed within 120 seconds. This is the default AD server timelimit. The C application didn't specify any timeouts
What am I missing here?
varun mittal wrote:
The timeout is a per-request timeout. Isn't doing paged requests explicitly about making multiple requests, with possibly semi-arbitrary delays by the client between them, but each of which therefore gets its own shot at the timeout?
That is what I struggling with to find some clear documentation on this. Should the TIMEOUT value suffice, or I need to use TIMELIMIT with paged searching. Or use timeout values with search_ext() and result() APIs There are multiple timeouts at different levels.
Philip is correct. The timeouts are per request. A client must send a distinct request to retrieve a page, there is no overarching time limit for all of the pages.
On Fri, Apr 16, 2021 at 3:52 AM Philip Guenther <pguenther@proofpoint.com mailto:pguenther@proofpoint.com> wrote:
The timeout is a per-request timeout. Isn't doing paged requests explicitly about making multiple requests, with possibly semi-arbitrary delays by the client between them, but each of which therefore gets its own shot at the timeout? Philip Guenther On Thu, 15 Apr 2021, varun mittal wrote: > Any inputs on this one ? > > The client timeout parameter works for individual search page or the entire > time period of the search, if there are multiple pages ? > > > On Fri, Apr 2, 2021 at 2:07 PM varun mittal <vmittal05@gmail.com <mailto:vmittal05@gmail.com>> wrote: > > > I am using openldap-2.4.39 on CentOS 7, to query my AD server, with > > python-ldap wrapper > > > > I set the following scheme: > > > > 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 or the result3() methods > > > > One of my python client LDAP searches(asynchronous with paging) took about > > 14 minutes to complete, in the customer environment. Eventually, the search > > was successful. > > > > 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. > > > > And the strange thing is that the similar query, but synchronous( > > ldap_search_ext_s) from my C client failed within 120 seconds. This is > > the default AD server timelimit. The C application didn't specify any > > timeouts > > > > What am I missing here? > > >
The timeouts are per request. A client must send a distinct request to retrieve a page, there is no overarching time limit for all of the
pages.
And the OPT_TIMEOUT value I am using with python-ldap would be applicable to each separate request, right ? I need not use the 'timeout' parameters from search() and result() APIs, correct ? The reason in my case the search was running for ~15 minutes would be that client would be receiving some data in each individual request ? Unfortunately I didn't collect the network trace to confirm this :(
The TIMELIMIT value won't help here
On Fri, 16 Apr, 2021, 8:52 PM Howard Chu, hyc@symas.com wrote:
varun mittal wrote:
The timeout is a per-request timeout. Isn't doing paged requests explicitly about making multiple requests, with possibly semi-arbitrary delays by the client between them, but each of which therefore gets its own shot at the timeout?
That is what I struggling with to find some clear documentation on this. Should the TIMEOUT value suffice, or I need to use TIMELIMIT with paged
searching. Or use timeout values with search_ext() and result() APIs
There are multiple timeouts at different levels.
Philip is correct. The timeouts are per request. A client must send a distinct request to retrieve a page, there is no overarching time limit for all of the pages.
On Fri, Apr 16, 2021 at 3:52 AM Philip Guenther <
pguenther@proofpoint.com mailto:pguenther@proofpoint.com> wrote:
The timeout is a per-request timeout. Isn't doing paged requests explicitly about making multiple requests, with possibly
semi-arbitrary
delays by the client between them, but each of which therefore gets
its
own shot at the timeout? Philip Guenther On Thu, 15 Apr 2021, varun mittal wrote: > Any inputs on this one ? > > The client timeout parameter works for individual search page or
the entire
> time period of the search, if there are multiple pages ? > > > On Fri, Apr 2, 2021 at 2:07 PM varun mittal <vmittal05@gmail.com
mailto:vmittal05@gmail.com> wrote:
> > > I am using openldap-2.4.39 on CentOS 7, to query my AD server,
with
> > python-ldap wrapper > > > > I set the following scheme: > > > > 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 or the result3()
methods
> > > > One of my python client LDAP searches(asynchronous with paging)
took about
> > 14 minutes to complete, in the customer environment. Eventually,
the search
> > was successful. > > > > 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.
> > > > And the strange thing is that the similar query, but synchronous( > > ldap_search_ext_s) from my C client failed within 120 seconds.
This is
> > the default AD server timelimit. The C application didn't
specify any
> > timeouts > > > > What am I missing here? > > >
-- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
openldap-technical@openldap.org