[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: connection timeout



Quanah Gibson-Mount wrote:


--On Sunday, March 26, 2006 8:17 PM -0500 Brandon McCombs <bmccombs@ma.rr.com> wrote:

Quanah Gibson-Mount wrote:


--On Sunday, March 26, 2006 5:02 PM -0500 Brandon McCombs
<bmccombs@ma.rr.com> wrote:

How do I set the connection timeout for idle connections? I found where
i could put 'timeout 60' in slapd.conf and so I tried that and restarted
but it doesn't seem to be taking effect with my custom client. Should
that be working?

Have you read the slapd.conf(5) man page?

specifically, the "idletimeout" directive.

ok, I tried that and although it wasn't exactly 60 seconds it seems to
have worked to a point.  Now my client just hangs w/o any error being
generated. I get errors returned after only a few seconds when my app
tries to perform an operation with other directories so I know my app
will display errors to the user.  Should openldap be alerting my client
to the error or just let the app forever attempt to reuse the connection
that timed out?

It sounds to me like your application is broken. A well written LDAP application will notice that its connection has been closed, and rebind.



My application *does* notice when working with other directories and prompts me to reconnect and when I click yes it works fine. I don't get that prompt right now with openldap because nothing is being returned from openldap to generate an exception. Maybe I am detecting the closed connection incorrectly (relying on a java exception) but it works fine with Sun and Active Directory because an exception is generated when working with them.