process_min_avail handling always created a 0ms timeout to try to create the
missing processes. This timeout was supposed to stop when it couldn't launch
all the wanted processes, but the check wasn't done right. This ended up
causing the timeout to be called rapidly over and over again.
/* we created some processes, they'll do the listening now */
service_monitor_listen_stop(service);
}
- return i == count;
+ return i >= limit;
}
static void service_monitor_prefork_timeout(struct service *service)
}
if (service->process_avail < service->set->process_min_avail) {
if (service_monitor_start_count(service, SERVICE_PREFORK_MAX_AT_ONCE) &&
- service->process_avail < service->set->process_min_avail)
+ service->process_avail < service->set->process_min_avail) {
+ /* All SERVICE_PREFORK_MAX_AT_ONCE were created, but
+ it still wasn't enough. Launch more in the next
+ timeout. */
return;
+ }
}
timeout_remove(&service->to_prefork);
}