Permalink
Browse files

Fix ApplicationPool bug: don't spawn more groups if count > max.

  • Loading branch information...
1 parent e2ae8a1 commit d94c6c71444b90d4bee5e1016f110a2a24e977af @FooBarWidget FooBarWidget committed Mar 7, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 doc/ApplicationPool algorithm.txt
  2. +1 −1 ext/common/ApplicationPool/Pool.h
@@ -328,7 +328,7 @@ private function checkout_without_lock(app_root, options):
# this function.
new_app_group_creatable.wait
goto beginning of function
- elsif count == max:
+ elsif count >= max:
# The pool is full, and not all processes are busy, but
# we're in a though situation nevertheless: there are
# several processes which are inactive, and none of them
@@ -943,7 +943,7 @@ class Pool: public ApplicationPool::Interface {
this_thread::restore_syscall_interruption rsi(dsi);
newAppGroupCreatable.wait(l);
goto beginning_of_function;
- } else if (count == max) {
+ } else if (count >= max) {
processInfo = inactiveApps.front();
P_DEBUG("Killing process " << processInfo->process->getPid() <<
" because an extra slot is necessary for spawning");

0 comments on commit d94c6c7

Please sign in to comment.