dovecot-1.2: If all login processes are in use and we can't crea...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Jan 20 22:04:30 EET 2009
details: http://hg.dovecot.org/dovecot-1.2/rev/ca964325664e
changeset: 8666:ca964325664e
user: Timo Sirainen <tss at iki.fi>
date: Tue Jan 20 15:04:25 2009 -0500
description:
If all login processes are in use and we can't create a new one, log a warning.
diffstat:
2 files changed, 9 insertions(+)
src/master/login-process.c | 8 ++++++++
src/master/login-process.h | 1 +
diffs (36 lines):
diff -r d1954af8aa3b -r ca964325664e src/master/login-process.c
--- a/src/master/login-process.c Tue Jan 20 12:31:58 2009 -0500
+++ b/src/master/login-process.c Tue Jan 20 15:04:25 2009 -0500
@@ -23,6 +23,8 @@
#include <syslog.h>
#include <sys/stat.h>
+#define LOGIN_LIMIT_WARNING_MIN_INTERVAL (60*5)
+
struct login_process {
struct child_process process;
@@ -801,6 +803,12 @@ static int login_group_start_missings(st
if (group->oldest_prelogin_process != NULL &&
group->oldest_prelogin_process->initialized)
login_process_destroy(group->oldest_prelogin_process);
+ else if (ioloop_time - group->last_limit_warning >
+ LOGIN_LIMIT_WARNING_MIN_INTERVAL) {
+ group->last_limit_warning = ioloop_time;
+ i_warning("All login processes are in use. You may "
+ "need to increase login_max_processes_count");
+ }
}
/* we want to respond fast when multiple clients are connecting
diff -r d1954af8aa3b -r ca964325664e src/master/login-process.h
--- a/src/master/login-process.h Tue Jan 20 12:31:58 2009 -0500
+++ b/src/master/login-process.h Tue Jan 20 15:04:25 2009 -0500
@@ -13,6 +13,7 @@ struct login_group {
unsigned int processes;
unsigned int listening_processes;
unsigned int wanted_processes_count;
+ time_t last_limit_warning;
/* if login_process_per_connection=yes this contains the list of
processes that are in LOGIN_STATE_FULL_PRELOGINS state */
More information about the dovecot-cvs
mailing list