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 !
added docs about setting the PassengerPoolIdleTime to 0.
redmar (author)
Sun Jun 15 02:11:14 -0700 2008
commit  49e3fd38998411b92e73cb0bf633cf56dffc82ce
tree    a7661f9b782c272cdc86f2988d9c48925dffd00a
parent  48b9e86f7c2eaf2b1ee77779711e3d5e2b64b922
...
299
300
301
 
302
303
304
...
312
313
314
315
 
 
 
316
317
318
...
299
300
301
302
303
304
305
...
313
314
315
 
316
317
318
319
320
321
0
@@ -299,6 +299,7 @@ function needs_restart(app_root):
0
 
0
 # The following thread will be responsible for cleaning up idle application
0
 # instances, i.e. instances that haven't been used for a while.
0
+# This can be disabled per app when setting it's maxIdleTime to 0.
0
 thread cleaner:
0
   lock.synchronize:
0
     done = false
0
@@ -312,7 +313,9 @@ thread cleaner:
0
       for all container in inactive_apps:
0
         app = container.app
0
         app_list = apps[app.app_root]
0
- if now - container.last_used > MAX_IDLE_TIME:
0
+ # if MAX_IDLE_TIME is 0 we don't clean up the instance,
0
+ # giving us the option to persist the app container forever unless it's killed by another app
0
+ if (MAX_IDLE_TIME > 0) and (now - container.last_used > MAX_IDLE_TIME):
0
           app_list.remove(container.iterator)
0
           inactive_apps.remove(iterator for container)
0
           app_instance_count[app.app_root]--
...
602
603
604
605
 
606
607
608
...
614
615
616
 
 
 
 
 
 
617
618
619
...
1216
1217
1218
1219
1220
 
 
1221
1222
1223
...
602
603
604
 
605
606
607
608
...
614
615
616
617
618
619
620
621
622
623
624
625
...
1222
1223
1224
 
 
1225
1226
1227
1228
1229
0
@@ -602,7 +602,7 @@ The default value is '0'.
0
 The maximum number of seconds that a Ruby on Rails or Rack application instance
0
 may be idle. That is, if an application instance hasn't done anything after
0
 the given number of seconds, then it will be shutdown in order to conserve
0
-memory.
0
+memory.
0
 
0
 Decreasing this value means that applications will have to be spawned
0
 more often. Since spawning is a relatively slow operation, some visitors may
0
@@ -614,6 +614,12 @@ Rails/Rack web page. We recommend a value of `2 * x`, where `x` is the average
0
 number of seconds that a visitor spends on a single Rails/Rack web page. But your
0
 mileage may vary.
0
 
0
+When this value is set to 0, application instances will not be shutdown unless
0
+it's really needed, i.e. passenger is out of workers for a given application and
0
+one of the given inactive app instance needs to make place for another app instance,
0
+effectively removing the spawn delay.
0
+This option value is only recommended if you are a son of RAM.
0
+
0
 This option may only occur once, in the global server configuration.
0
 The default value is '300'.
0
 
0
@@ -1216,8 +1222,8 @@ active:: The number of application instances that are currently processing
0
 requests. This value is always less than or equal to 'count'.
0
 inactive:: The number of application instances that are currently *not* processing
0
 requests, i.e. are idle. Idle application instances will be shutdown after a while,
0
-as can be specified with <<PassengerPoolIdleTime,PassengerPoolIdleTime>>. The value of 'inactive'
0
-equals `count - active`.
0
+as can be specified with <<PassengerPoolIdleTime,PassengerPoolIdleTime>> unless this
0
+value is set to 0. The value of 'inactive' equals `count - active`.
0
 
0
 The 'applications' section shows each application instance, which directory it belongs
0
 to. The 'sessions' field shows how many HTTP client are currently being processed by

Comments

    No one has commented yet.