Victor Duchovni:
> On Mon, Aug 31, 2009 at 10:33:54AM -0400, Wietse Venema wrote:
>
> > Victor Duchovni:
> > > On Mon, Aug 31, 2009 at 10:19:48AM -0400, Wietse Venema wrote:
> > >
> > > > > Aug 31 09:09:20 server postfix/smtpd[17106]: warning:
> > > > > dict_ldap_lookup:
> > > > > Search error -5: Timed out
> > > > >
> > > > > Aug 31 09:09:20 server postfix/cleanup[17106]: warning: AEF14688F:
> > > > > virtual_alias_maps map lookup problem for [email protected]
> > > >
> > > > I'll leave it up to the LDAP experts to figure out what is wrong.
> > >
> > > The first server always times out. LDAP support for multiple servers
> > > handles inability to connect. It does not fail over to a second server
> > > when the first server accepts connections, but always times out queries.
> >
> > The Postfix SMTP client switches to an alternate server when the
> > delivery attempt fails, even after a successful handshake (*);
> > should the LDAP client also do this?
>
> Currently, fail-over is handled by the LDAP library, which tries to
> connect to a list of servers in turn, until the first connection succeeds.
> We just pass a list of servers to the LDAP library.
>
> Perhaps the simplest enhancement would be to "rotate" the server list
> when a query times out, before asking the LDAP library to re-connect.
>
> server-list before time-out: s1 s2 ... sN
> server-list after time-out: s2 ... sN s1
>
> Any other suggestions?
Reversing the list may get a quicker recovery when there are more
than 2 servers, and the time-out happens somewhere in the middle.
When there are 2 servers, then rotating is equivalent to reversing.
Wietse