We got nominated! Help us out and vote for GitHub as Best Bootstrapped Startup of 2008. (You can vote once a day.) [ hide ]

public
Description: Phusion Passenger (mod_rails)
Homepage: http://www.modrails.com/
Clone URL: git://github.com/FooBarWidget/passenger.git
Click here to lend your support to: passenger and make a donation at www.pledgie.com !
Fix an invariant violation in the application pool algorithm.
Hongli Lai (Phusion) (author)
Sat Jun 28 09:06:49 -0700 2008
commit  f62f5fbd8ee92f1cff21e483d1e7087e15f09c96
tree    ac19366444a006c9f7c9649866fe763fa3f966fb
parent  e8eb510725d8bbd0ad1ec19326e93f2534fd3a02
...
178
179
180
 
181
182
183
...
178
179
180
181
182
183
184
0
@@ -178,6 +178,7 @@ function get(app_root):
0
         return container.app.connect()
0
       on exception:
0
         container.sessions--
0
+ domain.size--
0
         if (attempt == MAX_ATTEMPTS):
0
           propagate exception
0
         else:
...
215
216
217
218
 
 
219
220
221
...
629
630
631
 
632
633
634
...
652
653
654
655
 
656
657
658
...
215
216
217
 
218
219
220
221
222
...
630
631
632
633
634
635
636
...
654
655
656
 
657
658
659
660
0
@@ -215,7 +215,8 @@ private:
0
       AppContainerList *instances = &domain->instances;
0
       
0
       P_ASSERT(domain->size <= count, false,
0
- "domains['" << appRoot << "'].size <= count");
0
+ "domains['" << appRoot << "'].size (" << domain->size <<
0
+ ") <= count (" << count << ")");
0
       totalSize += domain->size;
0
       
0
       // Invariants for Domain.
0
@@ -629,6 +630,7 @@ public:
0
         return container->app->connect(SessionCloseCallback(data, container));
0
       } catch (const exception &e) {
0
         container->sessions--;
0
+ domain->size--;
0
         if (attempt == MAX_GET_ATTEMPTS) {
0
           string message("Cannot connect to an existing "
0
             "application instance for '");
0
@@ -652,7 +654,7 @@ public:
0
           active--;
0
           activeOrMaxChanged.notify_all();
0
           P_ASSERT(verifyState(), Application::SessionPtr(),
0
- "State is valid.");
0
+ "State is valid: " << toString(false));
0
         }
0
       }
0
     }

Comments

    No one has commented yet.