dovecot-1.1: LDAP: If auth request queue is full, log how long a...

dovecot at dovecot.org dovecot at dovecot.org
Thu Oct 9 00:08:56 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/0329dc4df5ed
changeset: 7929:0329dc4df5ed
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Oct 09 00:08:52 2008 +0300
description:
LDAP: If auth request queue is full, log how long ago the first request was added.

diffstat:

1 file changed, 6 insertions(+), 1 deletion(-)
src/auth/db-ldap.c |    7 ++++++-

diffs (18 lines):

diff -r 243aa2d43272 -r 0329dc4df5ed src/auth/db-ldap.c
--- a/src/auth/db-ldap.c	Wed Oct 08 22:44:40 2008 +0300
+++ b/src/auth/db-ldap.c	Thu Oct 09 00:08:52 2008 +0300
@@ -391,8 +391,13 @@ void db_ldap_request(struct ldap_connect
 	if (conn->request_queue->full &&
 	    aqueue_count(conn->request_queue) >= DB_LDAP_MAX_QUEUE_SIZE) {
 		/* Queue is full already, fail this request */
+		struct ldap_request *const *first_requestp;
+
+		first_requestp = array_idx(&conn->request_array,
+					   aqueue_idx(conn->request_queue, 0));
 		auth_request_log_error(request->auth_request, "ldap",
-				       "Request queue is full");
+			"Request queue is full (oldest added %d secs ago)",
+			(int)(time(NULL) - (*first_requestp)->create_time));
 		request->callback(conn, request, NULL);
 		return;
 	}


More information about the dovecot-cvs mailing list