Mercurial > dovecot > original-hg > dovecot-1.2
changeset 8666:ca964325664e HEAD
If all login processes are in use and we can't create a new one, log a warning.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 20 Jan 2009 15:04:25 -0500 |
parents | d1954af8aa3b |
children | d4376328f8c0 |
files | src/master/login-process.c src/master/login-process.h |
diffstat | 2 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ 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
--- 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 @@ 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 */