dovecot-2.1: master: If service_count=1 and process_limit=1 and ...

dovecot at dovecot.org dovecot at dovecot.org
Wed Jun 13 15:34:44 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.1/rev/4c31e450a867
changeset: 14556:4c31e450a867
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Jun 13 15:34:39 2012 +0300
description:
master: If service_count=1 and process_limit=1 and >1 clients connect, log about service_count being why.

diffstat:

 src/master/service-monitor.c |  18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diffs (36 lines):

diff -r 28ddc2058877 -r 4c31e450a867 src/master/service-monitor.c
--- a/src/master/service-monitor.c	Mon Jun 11 23:38:45 2012 +0300
+++ b/src/master/service-monitor.c	Wed Jun 13 15:34:39 2012 +0300
@@ -237,19 +237,27 @@
 static void service_drop_connections(struct service_listener *l)
 {
 	struct service *service = l->service;
+	const char *limit_name;
 	unsigned int limit;
 	int fd;
 
 	if (service->last_drop_warning +
 	    SERVICE_DROP_WARN_INTERVAL_SECS < ioloop_time) {
 		service->last_drop_warning = ioloop_time;
-		limit = service->process_limit > 1 ?
-			service->process_limit : service->client_limit;
+		if (service->process_limit > 1) {
+			limit_name = "process_limit";
+			limit = service->process_limit;
+		} else if (service->set->service_count == 1) {
+			i_assert(service->client_limit == 1);
+			limit_name = "client_limit/service_count";
+			limit = 1;
+		} else {
+			limit_name = "client_limit";
+			limit = service->client_limit;
+		}
 		i_warning("service(%s): %s (%u) reached, "
 			  "client connections are being dropped",
-			  service->set->name,
-			  service->process_limit > 1 ?
-			  "process_limit" : "client_limit", limit);
+			  service->set->name, limit_name, limit);
 	}
 
 	if (service->type == SERVICE_TYPE_LOGIN) {


More information about the dovecot-cvs mailing list