HomePhabricator

Resource exhausted because of unclosed LDAP connection

Authored by Jiang Xin <worldhello.net@gmail.com> on Jan 7 2015, 7:09 AM.

Description

Resource exhausted because of unclosed LDAP connection

When auth.type is set to LDAP (not LDAP_BIND), there will be two ldap
connections. The 1st connection will bind LDAP to find the DN of the
login user, and this connection will be closed in the try...finally
block. But the 2nd LDAP connection used to validate user password
is not closed at all. Too much unclosed TCP connections cause resource
exhausted and latter LDAP authentication will fail.

Change-Id: Ia5d83cccde8a0e6590d3e2fadc638d67f6e300e8
Reported-by: Wang Yiming <youthdragon.wangyiming@huawei.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
(cherry picked from commit 7ac03844b38b7682b16d6b4ae701d410f84b18fe)

Event Timeline

Claudio Pacchiega <claudio.pacchiega@gmail.com> committed rGERRITDEPLOY466ff5646884: Resource exhausted because of unclosed LDAP connection (authored by Jiang Xin <worldhello.net@gmail.com>).Jun 10 2016, 9:15 PM