dovecot-2.0: master: Allow idle-killing the last service process...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Oct 10 00:42:43 EEST 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/f14b6c68ddce
changeset: 10022:f14b6c68ddce
user: Timo Sirainen <tss at iki.fi>
date: Fri Oct 09 17:42:33 2009 -0400
description:
master: Allow idle-killing the last service process, except anvil.
diffstat:
1 file changed, 4 insertions(+), 5 deletions(-)
src/master/service-monitor.c | 9 ++++-----
diffs (26 lines):
diff -r 20b8f66d9f4e -r f14b6c68ddce src/master/service-monitor.c
--- a/src/master/service-monitor.c Fri Oct 09 17:23:27 2009 -0400
+++ b/src/master/service-monitor.c Fri Oct 09 17:42:33 2009 -0400
@@ -28,10 +28,8 @@ static void service_process_kill_idle(st
{
struct service *service = process->service;
- if (service->process_avail <= service->set->process_min_avail ||
- service->process_avail == 1) {
- /* we don't have any extra idling processes. and if there's
- no minimum limit, never kill the last process anyway */
+ if (service->process_avail <= service->set->process_min_avail) {
+ /* we don't have any extra idling processes anymore. */
timeout_remove(&process->to_idle);
} else {
if (kill(process->pid, SIGINT) < 0 && errno != ESRCH) {
@@ -79,7 +77,8 @@ static void service_status_less(struct s
if (status->available_count == service->client_limit) {
process->idle_start = ioloop_time;
if (service->process_avail > service->set->process_min_avail &&
- process->to_idle == NULL) {
+ process->to_idle == NULL &&
+ service->type != SERVICE_TYPE_ANVIL) {
/* we have more processes than we really need.
add a bit of randomness so that we don't send the
signal to all of them at once */
More information about the dovecot-cvs
mailing list