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

Re: Problem with connections: closed (connection lost)

Angel L. Mateo writes:
> 	Jul  5 09:44:33 canis4 slapd[28723]: conn=5087 fd=249 closed
> (connection lost)

OpenLDAP 2.2 just logged "closed", OpenLDAP 2.3 log lines also say why
it was closed.

If the client sends an Unbind request, slapd logs that.  Otherwise, if
the client just exist without doing ldap_unbind() first, all slapd knows
is that the connection disappeared for some reason.  It doesn't know
why, all it can say is "connection lost".  It's valid for a client to do
so, but a bit naughty because the server admin can't see if there is a
problem or not.

So - do you see lost connections in the mail server as well?  If so it's
a network problem.  Otherwise not.  If it's a client which opens one
LDAP connection, does something, and exits, it works fine (though please
ask them to change it anyway).  However if the client reopens a new
LDAP connection when it gets an LDAP error, without closing the old
LDAP connection with ldap_unbind(), you've got a file descriptor leak
and a memory leak in the client.

(The ldap_unbind function is quite misnamed.  It is the all-in-one
send-Unbind-and-close-connection function, so and should be used even
after an LDAP connection was lost on the client side - which can happen
e.g. if the server times out the connection.)