passenger 3.0.13 → 3.0.14

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of passenger might be problematic. Click here for more details.

data/NEWS CHANGED
@@ -1,3 +1,18 @@
1
+ Release 3.0.14
2
+ --------------
3
+
4
+ * [Apache] Fixed a long-standing mod_rewrite-related problem.
5
+ Some mod_rewrite rules would not work, but it depends on the exact
6
+ mod_rewrite configuration so it would work for some people but not
7
+ for others. Issue #563. Thanks a lot to cedricmaion for providing
8
+ information on the nature of the bug and to peter.nash55 for
9
+ providing a VM that allowed us to reproduce the problem.
10
+ * [Nginx] Preferred Nginx version to 1.2.2.
11
+ The previously preferred version was 1.2.1.
12
+ * Cleared some confusing terminology in the documentation.
13
+ * Fixed some Ruby 1.9 encoding problems.
14
+
15
+
1
16
  Release 3.0.13
2
17
  --------------
3
18
 
@@ -1504,7 +1504,7 @@ Attribution-Share Alike 3.0 Unported License</a>.</p></div>
1504
1504
  <div id="footnotes"><hr></div>
1505
1505
  <div id="footer">
1506
1506
  <div id="footer-text">
1507
- Last updated 2012-06-14 09:44:52 CEST
1507
+ Last updated 2012-06-14 11:55:27 CEST
1508
1508
  </div>
1509
1509
  </div>
1510
1510
  <script>/*! jQuery v1.7.1 jquery.com | jquery.org/license */
@@ -2492,9 +2492,9 @@ directory that’s readable by Apache, but only writable by administrators.</p><
2492
2492
  responses, protection is provided against slow HTTP clients that can not read your
2493
2493
  response immediately.</p></div>
2494
2494
  <div class="paragraph"><p>For example, consider an HTTP client that’s on a dial-up modem link, and your
2495
- application instance generates a 2 MB response. If response buffering is turned
2496
- off then your application instance will be blocked until the entire 2 MB has been
2497
- sent out to the HTTP client. This disallows your application instance to do any useful
2495
+ application process generates a 2 MB response. If response buffering is turned
2496
+ off then your application process will be blocked until the entire 2 MB has been
2497
+ sent out to the HTTP client. This disallows your application process to do any useful
2498
2498
  work in the mean time. By enabling response buffering, Phusion Passenger will read
2499
2499
  the application response as quickly as possible and will take care of slow clients.</p></div>
2500
2500
  <div class="paragraph"><p>However, keep in mind that enabling this option will make streaming responses
@@ -2689,13 +2689,13 @@ In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Options</span>
2689
2689
  <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_resource_control_and_optimization_options" data-comment-topic="resource-control-and-optimization-options-zu2f7u">5.12. Resource control and optimization options</h3>
2690
2690
  <div class="sect3">
2691
2691
  <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passengermaxpoolsize_lt_integer_gt" data-comment-topic="passengermaxpoolsize-integer--am64q8">5.12.1. PassengerMaxPoolSize &lt;integer&gt;</h4>
2692
- <div class="paragraph"><p>The maximum number of Ruby on Rails or Rack application instances that may
2693
- be simultaneously active. A larger number results in higher memory usage,
2692
+ <div class="paragraph"><p>The maximum number of <a href="#application_process">application processes</a> that may
2693
+ simultaneously exist. A larger number results in higher memory usage,
2694
2694
  but improved ability to handle concurrent HTTP clients.</p></div>
2695
2695
  <div class="paragraph"><p>The optimal value depends on your system’s hardware and the server’s average
2696
2696
  load. You should experiment with different values. But generally speaking,
2697
2697
  the value should be at least equal to the number of CPUs (or CPU cores) that
2698
- you have. If your system has 2 GB of RAM, then we recommend a value of <em>30</em>.
2698
+ you have. If your system has 2 GB of RAM, then we recommend a value of <em>15</em>.
2699
2699
  If your system is a Virtual Private Server (VPS) and has about 256 MB RAM, and
2700
2700
  is also running other services such as MySQL, then we recommend a value of <em>2</em>.</p></div>
2701
2701
  <div class="paragraph"><p>If you find that your server is unable to handle the load on your Rails/Rack websites
@@ -2710,32 +2710,32 @@ The default value is <em>6</em>.</p></div>
2710
2710
  <img src="./images/icons/tip.png" alt="Tip">
2711
2711
  </td>
2712
2712
  <td class="content">We strongly recommend you to <a href="#reducing_memory_usage">use Ruby Enterprise Edition</a>. This allows you to reduce the memory usage of your Ruby on Rails applications
2713
- by about 33%. And it’s not hard to install.</td>
2713
+ by about 33%, and it’s not hard to install.</td>
2714
2714
  </tr></table>
2715
2715
  </div>
2716
2716
  </div>
2717
2717
  <div class="sect3">
2718
2718
  <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerMinInstances" data-comment-topic="passengermininstances-integer--wegq6b">5.12.2. PassengerMinInstances &lt;integer&gt;</h4>
2719
- <div class="paragraph"><p>This specifies the minimum number of application instances that must be kept around
2720
- whenever Phusion Passenger cleans up idle instances. You should set this option to a
2719
+ <div class="paragraph"><p>This specifies the minimum number of application processes that should exist for a
2720
+ given application. You should set this option to a
2721
2721
  non-zero value if you want to avoid potentially long startup times after a website
2722
- has been idle for an extended period.</p></div>
2723
- <div class="paragraph"><p>Please note that this option does <strong>not</strong> pre-start application instances during Apache
2722
+ has been <a href="#idle_process">idle</a> for an extended period.</p></div>
2723
+ <div class="paragraph"><p>Please note that this option does <strong>not</strong> pre-start application processes during Apache
2724
2724
  startup. It just makes sure that when the application is first accessed:</p></div>
2725
2725
  <div class="olist arabic"><ol class="arabic">
2726
2726
  <li>
2727
2727
  <p>
2728
- at least the given number of instances will be spawned.
2728
+ at least the given number of processes will be spawned.
2729
2729
  </p>
2730
2730
  </li>
2731
2731
  <li>
2732
2732
  <p>
2733
- the given number of processes will be kept around even when instances are being
2733
+ the given number of processes will be kept around even when processes are being
2734
2734
  idle cleaned (see <a href="#PassengerPoolIdleTime">PassengerPoolIdleTime</a>).
2735
2735
  </p>
2736
2736
  </li>
2737
2737
  </ol></div>
2738
- <div class="paragraph"><p>If you want to pre-start application instances during Apache startup, then you should use the <a href="#PassengerPreStart">PassengerPreStart</a> directive, possibly in combination with
2738
+ <div class="paragraph"><p>If you want to pre-start application processes during Apache startup, then you should use the <a href="#PassengerPreStart">PassengerPreStart</a> directive, possibly in combination with
2739
2739
  <em>PassengerMinInstances</em>. This behavior might seem counter-intuitive at first sight,
2740
2740
  but <a href="#PassengerPreStart">PassengerPreStart</a> explains the rationale behind it.</p></div>
2741
2741
  <div class="paragraph"><p>For example, suppose that you have the following configuration:</p></div>
@@ -2751,15 +2751,15 @@ PassengerPoolIdleTime 10
2751
2751
  &lt;/VirtualHost&gt;</pre>
2752
2752
  </div>
2753
2753
  </div>
2754
- <div class="paragraph"><p>When you start Apache, there are 0 application instances for <em>foobar.com</em>. Things will
2754
+ <div class="paragraph"><p>When you start Apache, there are 0 application processes for <em>foobar.com</em>. Things will
2755
2755
  stay that way until someone visits <em>foobar.com</em>. Suppose that there is only 1 visitor.
2756
- 1 application instance will be started immediately to serve the visitor, while 2 will
2756
+ 1 application process will be started immediately to serve the visitor, while 2 will
2757
2757
  be spawned in the background. After 10 seconds, when the idle timeout has
2758
- been reached, these 3 application instances will not be cleaned up.</p></div>
2758
+ been reached, these 3 application processes will not be cleaned up.</p></div>
2759
2759
  <div class="paragraph"><p>Now suppose that there’s a sudden spike of traffic, and 100 users visit <em>foobar.com</em>
2760
- simultanously. Phusion Passenger will start 12 more application instances. After the idle
2760
+ simultanously. Phusion Passenger will start 12 more application processes. After the idle
2761
2761
  timeout of 10 seconds have passed, Phusion Passenger will clean up 12 application
2762
- instances, keeping 3 instances around.</p></div>
2762
+ processes, keeping 3 processes around.</p></div>
2763
2763
  <div class="paragraph"><p>The PassengerMinInstances option may occur in the following places:</p></div>
2764
2764
  <div class="ulist"><ul>
2765
2765
  <li>
@@ -2787,11 +2787,11 @@ In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Limits</span> i
2787
2787
  </div>
2788
2788
  <div class="sect3">
2789
2789
  <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passengermaxinstancesperapp_lt_integer_gt" data-comment-topic="passengermaxinstancesperapp-integer--1pteawn">5.12.3. PassengerMaxInstancesPerApp &lt;integer&gt;</h4>
2790
- <div class="paragraph"><p>The maximum number of application instances that may be simultaneously active
2790
+ <div class="paragraph"><p>The maximum number of application processes that may simultaneously exist
2791
2791
  for a single application. This helps to make sure that a single application
2792
2792
  will not occupy all available slots in the application pool.</p></div>
2793
2793
  <div class="paragraph"><p>This value must be less than <a href="#PassengerMaxPoolSize">PassengerMaxPoolSize</a>. A value of 0
2794
- means that there is no limit placed on the number of instances a single application
2794
+ means that there is no limit placed on the number of processes a single application
2795
2795
  may use, i.e. only the global limit of <a href="#PassengerMaxPoolSize">PassengerMaxPoolSize</a>
2796
2796
  will be enforced.</p></div>
2797
2797
  <div class="paragraph"><p>This option may only occur once, in the global server configuration.
@@ -2799,8 +2799,8 @@ The default value is <em>0</em>.</p></div>
2799
2799
  </div>
2800
2800
  <div class="sect3">
2801
2801
  <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerPoolIdleTime" data-comment-topic="passengerpoolidletime-integer--a3gunq">5.12.4. PassengerPoolIdleTime &lt;integer&gt;</h4>
2802
- <div class="paragraph"><p>The maximum number of seconds that an application instance may be idle. That is,
2803
- if an application instance hasn’t received any traffic after the given number of
2802
+ <div class="paragraph"><p>The maximum number of seconds that an application process may be idle. That is,
2803
+ if an application process hasn’t received any traffic after the given number of
2804
2804
  seconds, then it will be shutdown in order to conserve memory.</p></div>
2805
2805
  <div class="paragraph"><p>Decreasing this value means that applications will have to be spawned
2806
2806
  more often. Since spawning is a relatively slow operation, some visitors may
@@ -2810,10 +2810,10 @@ free up resources used by applications more quickly.</p></div>
2810
2810
  Rails/Rack web page. We recommend a value of <span class="monospaced">2 * x</span>, where <span class="monospaced">x</span> is the average
2811
2811
  number of seconds that a visitor spends on a single Rails/Rack web page. But your
2812
2812
  mileage may vary.</p></div>
2813
- <div class="paragraph"><p>When this value is set to <em>0</em>, application instances will not be shutdown unless
2814
- it’s really necessary, i.e. when Phusion Passenger is out of worker processes
2815
- for a given application and one of the inactive application instances needs to
2816
- make place for another application instance. Setting the value to 0 is
2813
+ <div class="paragraph"><p>When this value is set to <em>0</em>, application processes will not be shutdown unless
2814
+ it’s really necessary, i.e. when Phusion Passenger is out of application processes
2815
+ for a given application and one of the <a href="#inactive_process">inactive application processes</a> needs to
2816
+ make place for another application process. Setting the value to 0 is
2817
2817
  recommended if you’re on a non-shared host that’s only running a few
2818
2818
  applications, each which must be available at all times.</p></div>
2819
2819
  <div class="paragraph"><p>This option may only occur once, in the global server configuration.
@@ -2821,10 +2821,10 @@ The default value is <em>300</em>.</p></div>
2821
2821
  </div>
2822
2822
  <div class="sect3">
2823
2823
  <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerMaxRequests" data-comment-topic="passengermaxrequests-integer--ietgd0">5.12.5. PassengerMaxRequests &lt;integer&gt;</h4>
2824
- <div class="paragraph"><p>The maximum number of requests an application instance will process. After
2825
- serving that many requests, the application instance will be shut down and
2824
+ <div class="paragraph"><p>The maximum number of requests an application process will process. After
2825
+ serving that many requests, the application process will be shut down and
2826
2826
  Phusion Passenger will restart it. A value of 0 means that there is no maximum:
2827
- an application instance will thus be shut down when its idle timeout has been
2827
+ an application process will thus be shut down when its idle timeout has been
2828
2828
  reached.</p></div>
2829
2829
  <div class="paragraph"><p>This option is useful if your application is leaking memory. By shutting
2830
2830
  it down after a certain number of requests, all of its memory is guaranteed
@@ -2921,11 +2921,11 @@ In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Limits</span> i
2921
2921
  </div>
2922
2922
  <div class="sect3">
2923
2923
  <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerPreStart" data-comment-topic="passengerprestart-url--1v76tcz">5.12.7. PassengerPreStart &lt;url&gt;</h4>
2924
- <div class="paragraph"><p>By default, Phusion Passenger does not start any application instances until said
2924
+ <div class="paragraph"><p>By default, Phusion Passenger does not start any application processes until said
2925
2925
  web application is first accessed. The result is that the first visitor of said
2926
2926
  web application might experience a small delay as Phusion Passenger is starting
2927
2927
  the web application on demand. If that is undesirable, then this directive can be
2928
- used to pre-started application instances during Apache startup.</p></div>
2928
+ used to pre-started application processes during Apache startup.</p></div>
2929
2929
  <div class="paragraph"><p>A few things to be careful of:</p></div>
2930
2930
  <div class="ulist"><ul>
2931
2931
  <li>
@@ -2958,7 +2958,7 @@ The path part of the URL must point to some URI that the web application
2958
2958
  <li>
2959
2959
  <p>
2960
2960
  You will probably want to combine this option with
2961
- <a href="#PassengerMinInstances">PassengerMinInstances</a> because application instances
2961
+ <a href="#PassengerMinInstances">PassengerMinInstances</a> because application processes
2962
2962
  started with <em>PassengerPreStart</em> are subject to the usual idle timeout rules.
2963
2963
  See the example below for an explanation.
2964
2964
  </p>
@@ -3050,10 +3050,10 @@ The following example is wrong and won’t pre-start the store web application:<
3050
3050
  </div>
3051
3051
  <div class="sect4">
3052
3052
  <h5 id="_example_3_combining_with_passengermininstances">Example 3: combining with PassengerMinInstances</h5>
3053
- <div class="paragraph"><p>Application instances started with PassengerPreStart are
3053
+ <div class="paragraph"><p>Application processes started with PassengerPreStart are
3054
3054
  also subject to the idle timeout rules as specified by
3055
3055
  <a href="#PassengerPoolIdleTime">PassengerPoolIdleTime</a>! That means that by default,
3056
- the pre-started application instances for foo.com are bar.com are shut down
3056
+ the pre-started application processes for foo.com are bar.com are shut down
3057
3057
  after a few minutes of inactivity. If you don’t want that to happen, then
3058
3058
  you should combine PassengerPreStart with
3059
3059
  <a href="#PassengerMinInstances">PassengerMinInstances</a>, like this:</p></div>
@@ -3062,13 +3062,15 @@ you should combine PassengerPreStart with
3062
3062
  <pre>&lt;VirtualHost *:80&gt;
3063
3063
  ServerName foo.com
3064
3064
  DocumentRoot /webapps/foo/public
3065
- PassengerMinInstances 1 # &lt;--- added
3065
+ # Added!
3066
+ PassengerMinInstances 1
3066
3067
  &lt;/VirtualHost&gt;
3067
3068
 
3068
3069
  &lt;VirtualHost *:3500&gt;
3069
3070
  ServerName bar.com
3070
3071
  DocumentRoot /webapps/bar/public
3071
- PassengerMinInstances 1 # &lt;--- added
3072
+ # Added!
3073
+ PassengerMinInstances 1
3072
3074
  &lt;/VirtualHost&gt;
3073
3075
 
3074
3076
  PassengerPreStart http://foo.com/
@@ -4899,6 +4901,14 @@ For example, take the following directory structure:</p></div>
4899
4901
  </div>
4900
4902
  </div>
4901
4903
  </div>
4904
+ <div class="sect2">
4905
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="idle_process" data-comment-topic="idle-process-potb6g">11.2. Idle process</h3>
4906
+ <div class="paragraph"><p>An "idle process" refers to a process that hasn’t processed any requests for a while.</p></div>
4907
+ </div>
4908
+ <div class="sect2">
4909
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="inactive_process" data-comment-topic="inactive-process-16gjv2e">11.3. Inactive process</h3>
4910
+ <div class="paragraph"><p>An "inactive process" refers to a process that’s current not processing any requests. An idle process is always inactive, but an inactive process is not always considered idle.</p></div>
4911
+ </div>
4902
4912
  </div>
4903
4913
  </div>
4904
4914
  <div class="sect1">
@@ -5233,7 +5243,7 @@ has no effect.</p></div>
5233
5243
  <div id="footnotes"><hr></div>
5234
5244
  <div id="footer">
5235
5245
  <div id="footer-text">
5236
- Last updated 2012-06-14 09:49:56 CEST
5246
+ Last updated 2012-07-21 20:27:37 CEST
5237
5247
  </div>
5238
5248
  </div>
5239
5249
  <script>/*! jQuery v1.7.1 jquery.com | jquery.org/license */
@@ -24,6 +24,10 @@
24
24
 
25
25
  11.1. Application root => application-root-otx6xf
26
26
 
27
+ 11.2. Idle process => idle-process-potb6g
28
+
29
+ 11.3. Inactive process => inactive-process-16gjv2e
30
+
27
31
  12. Appendix C: Spawning methods explained => appendix-c-spawning-methods-explained-owghi9
28
32
 
29
33
  12.1. The most straightforward and traditional way: conservative spawning => the-most-straightforward-and-traditional-way-conservative-spawning-1ybbli2
@@ -922,9 +922,9 @@ responses, protection is provided against slow HTTP clients that can not read yo
922
922
  response immediately.
923
923
 
924
924
  For example, consider an HTTP client that's on a dial-up modem link, and your
925
- application instance generates a 2 MB response. If response buffering is turned
926
- off then your application instance will be blocked until the entire 2 MB has been
927
- sent out to the HTTP client. This disallows your application instance to do any useful
925
+ application process generates a 2 MB response. If response buffering is turned
926
+ off then your application process will be blocked until the entire 2 MB has been
927
+ sent out to the HTTP client. This disallows your application process to do any useful
928
928
  work in the mean time. By enabling response buffering, Phusion Passenger will read
929
929
  the application response as quickly as possible and will take care of slow clients.
930
930
 
@@ -1063,14 +1063,14 @@ In each place, it may be specified at most once. The default value is 'on'.
1063
1063
  === Resource control and optimization options ===
1064
1064
 
1065
1065
  ==== PassengerMaxPoolSize <integer> ====
1066
- The maximum number of Ruby on Rails or Rack application instances that may
1067
- be simultaneously active. A larger number results in higher memory usage,
1066
+ The maximum number of <<application_process,application processes>> that may
1067
+ simultaneously exist. A larger number results in higher memory usage,
1068
1068
  but improved ability to handle concurrent HTTP clients.
1069
1069
 
1070
1070
  The optimal value depends on your system's hardware and the server's average
1071
1071
  load. You should experiment with different values. But generally speaking,
1072
1072
  the value should be at least equal to the number of CPUs (or CPU cores) that
1073
- you have. If your system has 2 GB of RAM, then we recommend a value of '30'.
1073
+ you have. If your system has 2 GB of RAM, then we recommend a value of '15'.
1074
1074
  If your system is a Virtual Private Server (VPS) and has about 256 MB RAM, and
1075
1075
  is also running other services such as MySQL, then we recommend a value of '2'.
1076
1076
 
@@ -1084,23 +1084,23 @@ The default value is '6'.
1084
1084
 
1085
1085
  TIP: We strongly recommend you to <<reducing_memory_usage,use Ruby Enterprise
1086
1086
  Edition>>. This allows you to reduce the memory usage of your Ruby on Rails applications
1087
- by about 33%. And it's not hard to install.
1087
+ by about 33%, and it's not hard to install.
1088
1088
 
1089
1089
  [[PassengerMinInstances]]
1090
1090
  ==== PassengerMinInstances <integer> ====
1091
- This specifies the minimum number of application instances that must be kept around
1092
- whenever Phusion Passenger cleans up idle instances. You should set this option to a
1091
+ This specifies the minimum number of application processes that should exist for a
1092
+ given application. You should set this option to a
1093
1093
  non-zero value if you want to avoid potentially long startup times after a website
1094
- has been idle for an extended period.
1094
+ has been <<idle_process,idle>> for an extended period.
1095
1095
 
1096
- Please note that this option does *not* pre-start application instances during Apache
1096
+ Please note that this option does *not* pre-start application processes during Apache
1097
1097
  startup. It just makes sure that when the application is first accessed:
1098
1098
 
1099
- 1. at least the given number of instances will be spawned.
1100
- 2. the given number of processes will be kept around even when instances are being
1099
+ 1. at least the given number of processes will be spawned.
1100
+ 2. the given number of processes will be kept around even when processes are being
1101
1101
  idle cleaned (see <<PassengerPoolIdleTime,PassengerPoolIdleTime>>).
1102
1102
 
1103
- If you want to pre-start application instances during Apache startup, then you should use the <<PassengerPreStart,PassengerPreStart>> directive, possibly in combination with
1103
+ If you want to pre-start application processes during Apache startup, then you should use the <<PassengerPreStart,PassengerPreStart>> directive, possibly in combination with
1104
1104
  'PassengerMinInstances'. This behavior might seem counter-intuitive at first sight,
1105
1105
  but <<PassengerPreStart,PassengerPreStart>> explains the rationale behind it.
1106
1106
 
@@ -1117,16 +1117,16 @@ PassengerPoolIdleTime 10
1117
1117
  </VirtualHost>
1118
1118
  ---------------------------------
1119
1119
 
1120
- When you start Apache, there are 0 application instances for 'foobar.com'. Things will
1120
+ When you start Apache, there are 0 application processes for 'foobar.com'. Things will
1121
1121
  stay that way until someone visits 'foobar.com'. Suppose that there is only 1 visitor.
1122
- 1 application instance will be started immediately to serve the visitor, while 2 will
1122
+ 1 application process will be started immediately to serve the visitor, while 2 will
1123
1123
  be spawned in the background. After 10 seconds, when the idle timeout has
1124
- been reached, these 3 application instances will not be cleaned up.
1124
+ been reached, these 3 application processes will not be cleaned up.
1125
1125
 
1126
1126
  Now suppose that there's a sudden spike of traffic, and 100 users visit 'foobar.com'
1127
- simultanously. Phusion Passenger will start 12 more application instances. After the idle
1127
+ simultanously. Phusion Passenger will start 12 more application processes. After the idle
1128
1128
  timeout of 10 seconds have passed, Phusion Passenger will clean up 12 application
1129
- instances, keeping 3 instances around.
1129
+ processes, keeping 3 processes around.
1130
1130
 
1131
1131
  The PassengerMinInstances option may occur in the following places:
1132
1132
 
@@ -1138,12 +1138,12 @@ The PassengerMinInstances option may occur in the following places:
1138
1138
  In each place, it may be specified at most once. The default value is '1'.
1139
1139
 
1140
1140
  ==== PassengerMaxInstancesPerApp <integer> ====
1141
- The maximum number of application instances that may be simultaneously active
1141
+ The maximum number of application processes that may simultaneously exist
1142
1142
  for a single application. This helps to make sure that a single application
1143
1143
  will not occupy all available slots in the application pool.
1144
1144
 
1145
1145
  This value must be less than <<PassengerMaxPoolSize,PassengerMaxPoolSize>>. A value of 0
1146
- means that there is no limit placed on the number of instances a single application
1146
+ means that there is no limit placed on the number of processes a single application
1147
1147
  may use, i.e. only the global limit of <<PassengerMaxPoolSize,PassengerMaxPoolSize>>
1148
1148
  will be enforced.
1149
1149
 
@@ -1152,8 +1152,8 @@ The default value is '0'.
1152
1152
 
1153
1153
  [[PassengerPoolIdleTime]]
1154
1154
  ==== PassengerPoolIdleTime <integer> ====
1155
- The maximum number of seconds that an application instance may be idle. That is,
1156
- if an application instance hasn't received any traffic after the given number of
1155
+ The maximum number of seconds that an application process may be idle. That is,
1156
+ if an application process hasn't received any traffic after the given number of
1157
1157
  seconds, then it will be shutdown in order to conserve memory.
1158
1158
 
1159
1159
  Decreasing this value means that applications will have to be spawned
@@ -1166,10 +1166,10 @@ Rails/Rack web page. We recommend a value of `2 * x`, where `x` is the average
1166
1166
  number of seconds that a visitor spends on a single Rails/Rack web page. But your
1167
1167
  mileage may vary.
1168
1168
 
1169
- When this value is set to '0', application instances will not be shutdown unless
1170
- it's really necessary, i.e. when Phusion Passenger is out of worker processes
1171
- for a given application and one of the inactive application instances needs to
1172
- make place for another application instance. Setting the value to 0 is
1169
+ When this value is set to '0', application processes will not be shutdown unless
1170
+ it's really necessary, i.e. when Phusion Passenger is out of application processes
1171
+ for a given application and one of the <<inactive_process,inactive application processes>> needs to
1172
+ make place for another application process. Setting the value to 0 is
1173
1173
  recommended if you're on a non-shared host that's only running a few
1174
1174
  applications, each which must be available at all times.
1175
1175
 
@@ -1178,10 +1178,10 @@ The default value is '300'.
1178
1178
 
1179
1179
  [[PassengerMaxRequests]]
1180
1180
  ==== PassengerMaxRequests <integer> ====
1181
- The maximum number of requests an application instance will process. After
1182
- serving that many requests, the application instance will be shut down and
1181
+ The maximum number of requests an application process will process. After
1182
+ serving that many requests, the application process will be shut down and
1183
1183
  Phusion Passenger will restart it. A value of 0 means that there is no maximum:
1184
- an application instance will thus be shut down when its idle timeout has been
1184
+ an application process will thus be shut down when its idle timeout has been
1185
1185
  reached.
1186
1186
 
1187
1187
  This option is useful if your application is leaking memory. By shutting
@@ -1236,11 +1236,11 @@ In each place, it may be specified at most once. The default value is '0'.
1236
1236
 
1237
1237
  [[PassengerPreStart]]
1238
1238
  ==== PassengerPreStart <url> ====
1239
- By default, Phusion Passenger does not start any application instances until said
1239
+ By default, Phusion Passenger does not start any application processes until said
1240
1240
  web application is first accessed. The result is that the first visitor of said
1241
1241
  web application might experience a small delay as Phusion Passenger is starting
1242
1242
  the web application on demand. If that is undesirable, then this directive can be
1243
- used to pre-started application instances during Apache startup.
1243
+ used to pre-started application processes during Apache startup.
1244
1244
 
1245
1245
  A few things to be careful of:
1246
1246
 
@@ -1254,7 +1254,7 @@ A few things to be careful of:
1254
1254
  * The path part of the URL must point to some URI that the web application
1255
1255
  handles.
1256
1256
  - You will probably want to combine this option with
1257
- <<PassengerMinInstances,PassengerMinInstances>> because application instances
1257
+ <<PassengerMinInstances,PassengerMinInstances>> because application processes
1258
1258
  started with 'PassengerPreStart' are subject to the usual idle timeout rules.
1259
1259
  See the example below for an explanation.
1260
1260
 
@@ -1335,10 +1335,10 @@ PassengerPreStart http://myblog.com/ # <----- WRONG! Missing "/store" part.
1335
1335
 
1336
1336
  ===== Example 3: combining with PassengerMinInstances =====
1337
1337
 
1338
- Application instances started with PassengerPreStart are
1338
+ Application processes started with PassengerPreStart are
1339
1339
  also subject to the idle timeout rules as specified by
1340
1340
  <<PassengerPoolIdleTime,PassengerPoolIdleTime>>! That means that by default,
1341
- the pre-started application instances for foo.com are bar.com are shut down
1341
+ the pre-started application processes for foo.com are bar.com are shut down
1342
1342
  after a few minutes of inactivity. If you don't want that to happen, then
1343
1343
  you should combine PassengerPreStart with
1344
1344
  <<PassengerMinInstances,PassengerMinInstances>>, like this:
@@ -1347,13 +1347,15 @@ you should combine PassengerPreStart with
1347
1347
  <VirtualHost *:80>
1348
1348
  ServerName foo.com
1349
1349
  DocumentRoot /webapps/foo/public
1350
- PassengerMinInstances 1 # <--- added
1350
+ # Added!
1351
+ PassengerMinInstances 1
1351
1352
  </VirtualHost>
1352
1353
 
1353
1354
  <VirtualHost *:3500>
1354
1355
  ServerName bar.com
1355
1356
  DocumentRoot /webapps/bar/public
1356
- PassengerMinInstances 1 # <--- added
1357
+ # Added!
1358
+ PassengerMinInstances 1
1357
1359
  </VirtualHost>
1358
1360
 
1359
1361
  PassengerPreStart http://foo.com/
@@ -2276,9 +2276,9 @@ disk if the response is larger than a certain threshold. By buffering responses,
2276
2276
  protection is provided against slow HTTP clients that can not read your response
2277
2277
  immediately.</p></div>
2278
2278
  <div class="paragraph"><p>For example, consider an HTTP client that’s on a dial-up modem link, and your
2279
- application instance generates a 2 MB response. If response buffering is turned
2280
- off then your application instance will be blocked until the entire 2 MB has been
2281
- sent out to the HTTP client. This disallows your application instance to do any useful
2279
+ application process generates a 2 MB response. If response buffering is turned
2280
+ off then your application process will be blocked until the entire 2 MB has been
2281
+ sent out to the HTTP client. This disallows your application process to do any useful
2282
2282
  work in the mean time. By enabling response buffering, Phusion Passenger will read
2283
2283
  the application response as quickly as possible and will take care of slow clients.</p></div>
2284
2284
  <div class="paragraph"><p>However, keep in mind that enabling this option will make streaming responses
@@ -2484,13 +2484,13 @@ In an <em>if</em> configuration scope.
2484
2484
  <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_resource_control_and_optimization_options" data-comment-topic="resource-control-and-optimization-options-xd7evs">5.7. Resource control and optimization options</h3>
2485
2485
  <div class="sect3">
2486
2486
  <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerMaxPoolSize" data-comment-topic="passenger-max-pool-size-integer--3jzefs">5.7.1. passenger_max_pool_size &lt;integer&gt;</h4>
2487
- <div class="paragraph"><p>The maximum number of Ruby on Rails or Rack application instances that may
2488
- be simultaneously active. A larger number results in higher memory usage,
2487
+ <div class="paragraph"><p>The maximum number of <a href="#application_process">application processes</a> that may
2488
+ simultanously exist. A larger number results in higher memory usage,
2489
2489
  but improved ability to handle concurrent HTTP clients.</p></div>
2490
2490
  <div class="paragraph"><p>The optimal value depends on your system’s hardware and the server’s average
2491
2491
  load. You should experiment with different values. But generally speaking,
2492
2492
  the value should be at least equal to the number of CPUs (or CPU cores) that
2493
- you have. If your system has 2 GB of RAM, then we recommend a value of <em>30</em>.
2493
+ you have. If your system has 2 GB of RAM, then we recommend a value of <em>15</em>.
2494
2494
  If your system is a Virtual Private Server (VPS) and has about 256 MB RAM, and
2495
2495
  is also running other services such as MySQL, then we recommend a value of <em>2</em>.</p></div>
2496
2496
  <div class="paragraph"><p>If you find that your server is unable to handle the load on your Rails/Rack websites
@@ -2505,32 +2505,32 @@ The default value is <em>6</em>.</p></div>
2505
2505
  <img src="./images/icons/tip.png" alt="Tip">
2506
2506
  </td>
2507
2507
  <td class="content">We strongly recommend you to <a href="#reducing_memory_usage">use Ruby Enterprise Edition</a>. This allows you to reduce the memory usage of your Ruby on Rails applications
2508
- by about 33%. And it’s not hard to install.</td>
2508
+ by about 33%, and it’s not hard to install.</td>
2509
2509
  </tr></table>
2510
2510
  </div>
2511
2511
  </div>
2512
2512
  <div class="sect3">
2513
2513
  <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerMinInstances" data-comment-topic="passenger-min-instances-integer--uclykt">5.7.2. passenger_min_instances &lt;integer&gt;</h4>
2514
- <div class="paragraph"><p>This specifies the minimum number of application instances that must be kept around
2515
- whenever Phusion Passenger cleans up idle instances. You should set this option to a
2514
+ <div class="paragraph"><p>This specifies the minimum number of application processes that should exist for a
2515
+ given application. You should set this option to a
2516
2516
  non-zero value if you want to avoid potentially long startup times after a website
2517
- has been idle for an extended period.</p></div>
2518
- <div class="paragraph"><p>Please note that this option does <strong>not</strong> pre-start application instances during Nginx
2517
+ has been <a href="#idle_process">idle</a> for an extended period.</p></div>
2518
+ <div class="paragraph"><p>Please note that this option does <strong>not</strong> pre-start application processes during Nginx
2519
2519
  startup. It just makes sure that when the application is first accessed:</p></div>
2520
2520
  <div class="olist arabic"><ol class="arabic">
2521
2521
  <li>
2522
2522
  <p>
2523
- at least the given number of instances will be spawned.
2523
+ at least the given number of processes will be spawned.
2524
2524
  </p>
2525
2525
  </li>
2526
2526
  <li>
2527
2527
  <p>
2528
- the given number of processes will be kept around even when instances are being
2528
+ the given number of processes will be kept around even when processes are being
2529
2529
  idle cleaned (see <a href="#PassengerPoolIdleTime">passenger_pool_idle_time</a>).
2530
2530
  </p>
2531
2531
  </li>
2532
2532
  </ol></div>
2533
- <div class="paragraph"><p>If you want to pre-start application instances during Nginx startup, then you should use the <a href="#PassengerPreStart">passenger_pre_start</a> directive, possibly in combination with
2533
+ <div class="paragraph"><p>If you want to pre-start application processes during Nginx startup, then you should use the <a href="#PassengerPreStart">passenger_pre_start</a> directive, possibly in combination with
2534
2534
  <em>passenger_min_instances</em>. This behavior might seem counter-intuitive at first sight,
2535
2535
  but <a href="#PassengerPreStart">passenger_pre_start</a> explains the rationale behind it.</p></div>
2536
2536
  <div class="paragraph"><p>For example, suppose that you have the following configuration:</p></div>
@@ -2550,15 +2550,15 @@ but <a href="#PassengerPreStart">passenger_pre_start</a> explains the rationale
2550
2550
  }</pre>
2551
2551
  </div>
2552
2552
  </div>
2553
- <div class="paragraph"><p>When you start Nginx, there are 0 application instances for <em>foobar.com</em>. Things will
2553
+ <div class="paragraph"><p>When you start Nginx, there are 0 application processes for <em>foobar.com</em>. Things will
2554
2554
  stay that way until someone visits <em>foobar.com</em>. Suppose that there is only 1 visitor.
2555
- 1 application instance will be started immediately to serve the visitor, while 2 will
2555
+ 1 application process will be started immediately to serve the visitor, while 2 will
2556
2556
  be spawned in the background. After 10 seconds, when the idle timeout has
2557
- been reached, these 3 application instances will not be cleaned up.</p></div>
2557
+ been reached, these 3 application processes will not be cleaned up.</p></div>
2558
2558
  <div class="paragraph"><p>Now suppose that there’s a sudden spike of traffic, and 100 users visit <em>foobar.com</em>
2559
- simultanously. Phusion Passenger will start 12 more application instances. After the idle
2559
+ simultanously. Phusion Passenger will start 12 more application processes. After the idle
2560
2560
  timeout of 10 seconds have passed, Phusion Passenger will clean up 12 application
2561
- instances, keeping 3 instances around.</p></div>
2561
+ processes, keeping 3 processes around.</p></div>
2562
2562
  <div class="paragraph"><p>The passenger_min_instances option may occur in the following places:</p></div>
2563
2563
  <div class="ulist"><ul>
2564
2564
  <li>
@@ -2586,11 +2586,11 @@ In an <em>if</em> configuration scope.
2586
2586
  </div>
2587
2587
  <div class="sect3">
2588
2588
  <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_max_instances_per_app_lt_integer_gt" data-comment-topic="passenger-max-instances-per-app-integer--1p7q3cf">5.7.3. passenger_max_instances_per_app &lt;integer&gt;</h4>
2589
- <div class="paragraph"><p>The maximum number of application instances that may be simultaneously active
2589
+ <div class="paragraph"><p>The maximum number of application processes that may simultaneously exist
2590
2590
  for a single application. This helps to make sure that a single application
2591
2591
  will not occupy all available slots in the application pool.</p></div>
2592
2592
  <div class="paragraph"><p>This value must be less than <a href="#PassengerMaxPoolSize">passenger_max_pool_size</a>. A value of 0
2593
- means that there is no limit placed on the number of instances a single application
2593
+ means that there is no limit placed on the number of processes a single application
2594
2594
  may use, i.e. only the global limit of <a href="#PassengerMaxPoolSize">passenger_max_pool_size</a>
2595
2595
  will be enforced.</p></div>
2596
2596
  <div class="paragraph"><p>This option may only occur once, in the <em>http</em> configuration block.
@@ -2598,8 +2598,8 @@ The default value is <em>0</em>.</p></div>
2598
2598
  </div>
2599
2599
  <div class="sect3">
2600
2600
  <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerPoolIdleTime" data-comment-topic="passenger-pool-idle-time-integer--xcw65o">5.7.4. passenger_pool_idle_time &lt;integer&gt;</h4>
2601
- <div class="paragraph"><p>The maximum number of seconds that an application instance may be idle. That is,
2602
- if an application instance hasn’t received any traffic after the given number of
2601
+ <div class="paragraph"><p>The maximum number of seconds that an application process may be idle. That is,
2602
+ if an application process hasn’t received any traffic after the given number of
2603
2603
  seconds, then it will be shutdown in order to conserve memory.</p></div>
2604
2604
  <div class="paragraph"><p>Decreasing this value means that applications will have to be spawned
2605
2605
  more often. Since spawning is a relatively slow operation, some visitors may
@@ -2609,10 +2609,10 @@ free up resources used by applications more quickly.</p></div>
2609
2609
  Rails/Rack web page. We recommend a value of <span class="monospaced">2 * x</span>, where <span class="monospaced">x</span> is the average
2610
2610
  number of seconds that a visitor spends on a single Rails/Rack web page. But your
2611
2611
  mileage may vary.</p></div>
2612
- <div class="paragraph"><p>When this value is set to <em>0</em>, application instances will not be shutdown unless
2612
+ <div class="paragraph"><p>When this value is set to <em>0</em>, application processes will not be shutdown unless
2613
2613
  it’s really necessary, i.e. when Phusion Passenger is out of worker processes
2614
- for a given application and one of the inactive application instances needs to
2615
- make place for another application instance. Setting the value to 0 is
2614
+ for a given application and one of the <a href="#inactive_process">inactive application processes</a> needs to
2615
+ make place for another application process. Setting the value to 0 is
2616
2616
  recommended if you’re on a non-shared host that’s only running a few
2617
2617
  applications, each which must be available at all times.</p></div>
2618
2618
  <div class="paragraph"><p>This option may only occur once, in the <em>http</em> configuration block.
@@ -2620,10 +2620,10 @@ The default value is <em>300</em>.</p></div>
2620
2620
  </div>
2621
2621
  <div class="sect3">
2622
2622
  <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerMaxRequests" data-comment-topic="passenger-max-requests-integer--sgzint">5.7.5. passenger_max_requests &lt;integer&gt;</h4>
2623
- <div class="paragraph"><p>The maximum number of requests an application instance will process. After
2624
- serving that many requests, the application instance will be shut down and
2623
+ <div class="paragraph"><p>The maximum number of requests an application process will process. After
2624
+ serving that many requests, the application process will be shut down and
2625
2625
  Phusion Passenger will restart it. A value of 0 means that there is no maximum:
2626
- an application instance will thus be shut down when its idle timeout has been
2626
+ an application process will thus be shut down when its idle timeout has been
2627
2627
  reached.</p></div>
2628
2628
  <div class="paragraph"><p>This option is useful if your application is leaking memory. By shutting
2629
2629
  it down after a certain number of requests, all of its memory is guaranteed
@@ -2668,11 +2668,11 @@ measure to avoid memory leaks.</p></div>
2668
2668
  </div>
2669
2669
  <div class="sect3">
2670
2670
  <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerPreStart" data-comment-topic="passenger-pre-start-url--qeevln">5.7.6. passenger_pre_start &lt;url&gt;</h4>
2671
- <div class="paragraph"><p>By default, Phusion Passenger does not start any application instances until said
2671
+ <div class="paragraph"><p>By default, Phusion Passenger does not start any application processes until said
2672
2672
  web application is first accessed. The result is that the first visitor of said
2673
2673
  web application might experience a small delay as Phusion Passenger is starting
2674
2674
  the web application on demand. If that is undesirable, then this directive can be
2675
- used to pre-started application instances during Nginx startup.</p></div>
2675
+ used to pre-started application processes during Nginx startup.</p></div>
2676
2676
  <div class="paragraph"><p>A few things to be careful of:</p></div>
2677
2677
  <div class="ulist"><ul>
2678
2678
  <li>
@@ -2705,7 +2705,7 @@ The path part of the URL must point to some URI that the web application
2705
2705
  <li>
2706
2706
  <p>
2707
2707
  You will probably want to combine this option with
2708
- <a href="#PassengerMinInstances">passenger_min_instances</a> because application instances
2708
+ <a href="#PassengerMinInstances">passenger_min_instances</a> because application processes
2709
2709
  started with <em>passenger_pre_start</em> are subject to the usual idle timeout rules.
2710
2710
  See the example below for an explanation.
2711
2711
  </p>
@@ -2794,10 +2794,10 @@ The following example is wrong and won’t pre-start the store web application:<
2794
2794
  </div>
2795
2795
  <div class="sect4">
2796
2796
  <h5 id="_example_3_combining_with_passenger_min_instances">Example 3: combining with passenger_min_instances</h5>
2797
- <div class="paragraph"><p>Application instances started with passenger_pre_start are
2797
+ <div class="paragraph"><p>Application processes started with passenger_pre_start are
2798
2798
  also subject to the idle timeout rules as specified by
2799
2799
  <a href="#PassengerPoolIdleTime">passenger_pool_idle_time</a>! That means that by default,
2800
- the pre-started application instances for foo.com are bar.com are shut down
2800
+ the pre-started application processes for foo.com are bar.com are shut down
2801
2801
  after a few minutes of inactivity. If you don’t want that to happen, then
2802
2802
  you should combine passenger_pre_start with
2803
2803
  <a href="#PassengerMinInstances">passenger_min_instances</a>, like this:</p></div>
@@ -3757,6 +3757,14 @@ For example, take the following directory structure:</p></div>
3757
3757
  </div>
3758
3758
  </div>
3759
3759
  </div>
3760
+ <div class="sect2">
3761
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="idle_process" data-comment-topic="idle-process-13byfw9">10.2. Idle process</h3>
3762
+ <div class="paragraph"><p>An "idle process" refers to a process that hasn’t processed any requests for a while.</p></div>
3763
+ </div>
3764
+ <div class="sect2">
3765
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="inactive_process" data-comment-topic="inactive-process-1d2h0po">10.3. Inactive process</h3>
3766
+ <div class="paragraph"><p>An "inactive process" refers to a process that’s current not processing any requests. An idle process is always inactive, but an inactive process is not always considered idle.</p></div>
3767
+ </div>
3760
3768
  </div>
3761
3769
  </div>
3762
3770
  <div class="sect1">
@@ -4091,7 +4099,7 @@ has no effect.</p></div>
4091
4099
  <div id="footnotes"><hr></div>
4092
4100
  <div id="footer">
4093
4101
  <div id="footer-text">
4094
- Last updated 2012-06-14 09:44:53 CEST
4102
+ Last updated 2012-07-21 20:27:37 CEST
4095
4103
  </div>
4096
4104
  </div>
4097
4105
  <script>/*! jQuery v1.7.1 jquery.com | jquery.org/license */
@@ -22,6 +22,10 @@
22
22
 
23
23
  10.1. Application root => application-root-1fd6bqv
24
24
 
25
+ 10.2. Idle process => idle-process-13byfw9
26
+
27
+ 10.3. Inactive process => inactive-process-1d2h0po
28
+
25
29
  11. Appendix C: Spawning methods explained => appendix-c-spawning-methods-explained-tcp8e6
26
30
 
27
31
  11.1. The most straightforward and traditional way: conservative spawning => the-most-straightforward-and-traditional-way-conservative-spawning-civ29z
@@ -774,9 +774,9 @@ protection is provided against slow HTTP clients that can not read your response
774
774
  immediately.
775
775
 
776
776
  For example, consider an HTTP client that's on a dial-up modem link, and your
777
- application instance generates a 2 MB response. If response buffering is turned
778
- off then your application instance will be blocked until the entire 2 MB has been
779
- sent out to the HTTP client. This disallows your application instance to do any useful
777
+ application process generates a 2 MB response. If response buffering is turned
778
+ off then your application process will be blocked until the entire 2 MB has been
779
+ sent out to the HTTP client. This disallows your application process to do any useful
780
780
  work in the mean time. By enabling response buffering, Phusion Passenger will read
781
781
  the application response as quickly as possible and will take care of slow clients.
782
782
 
@@ -915,14 +915,14 @@ In each place, it may be specified at most once. The default value is 'on'.
915
915
  === Resource control and optimization options ===
916
916
  [[PassengerMaxPoolSize]]
917
917
  ==== passenger_max_pool_size <integer> ====
918
- The maximum number of Ruby on Rails or Rack application instances that may
919
- be simultaneously active. A larger number results in higher memory usage,
918
+ The maximum number of <<application_process,application processes>> that may
919
+ simultanously exist. A larger number results in higher memory usage,
920
920
  but improved ability to handle concurrent HTTP clients.
921
921
 
922
922
  The optimal value depends on your system's hardware and the server's average
923
923
  load. You should experiment with different values. But generally speaking,
924
924
  the value should be at least equal to the number of CPUs (or CPU cores) that
925
- you have. If your system has 2 GB of RAM, then we recommend a value of '30'.
925
+ you have. If your system has 2 GB of RAM, then we recommend a value of '15'.
926
926
  If your system is a Virtual Private Server (VPS) and has about 256 MB RAM, and
927
927
  is also running other services such as MySQL, then we recommend a value of '2'.
928
928
 
@@ -936,23 +936,23 @@ The default value is '6'.
936
936
 
937
937
  TIP: We strongly recommend you to <<reducing_memory_usage,use Ruby Enterprise
938
938
  Edition>>. This allows you to reduce the memory usage of your Ruby on Rails applications
939
- by about 33%. And it's not hard to install.
939
+ by about 33%, and it's not hard to install.
940
940
 
941
941
  [[PassengerMinInstances]]
942
942
  ==== passenger_min_instances <integer> ====
943
- This specifies the minimum number of application instances that must be kept around
944
- whenever Phusion Passenger cleans up idle instances. You should set this option to a
943
+ This specifies the minimum number of application processes that should exist for a
944
+ given application. You should set this option to a
945
945
  non-zero value if you want to avoid potentially long startup times after a website
946
- has been idle for an extended period.
946
+ has been <<idle_process,idle>> for an extended period.
947
947
 
948
- Please note that this option does *not* pre-start application instances during Nginx
948
+ Please note that this option does *not* pre-start application processes during Nginx
949
949
  startup. It just makes sure that when the application is first accessed:
950
950
 
951
- 1. at least the given number of instances will be spawned.
952
- 2. the given number of processes will be kept around even when instances are being
951
+ 1. at least the given number of processes will be spawned.
952
+ 2. the given number of processes will be kept around even when processes are being
953
953
  idle cleaned (see <<PassengerPoolIdleTime,passenger_pool_idle_time>>).
954
954
 
955
- If you want to pre-start application instances during Nginx startup, then you should use the <<PassengerPreStart,passenger_pre_start>> directive, possibly in combination with
955
+ If you want to pre-start application processes during Nginx startup, then you should use the <<PassengerPreStart,passenger_pre_start>> directive, possibly in combination with
956
956
  'passenger_min_instances'. This behavior might seem counter-intuitive at first sight,
957
957
  but <<PassengerPreStart,passenger_pre_start>> explains the rationale behind it.
958
958
 
@@ -973,16 +973,16 @@ http {
973
973
  }
974
974
  ---------------------------------
975
975
 
976
- When you start Nginx, there are 0 application instances for 'foobar.com'. Things will
976
+ When you start Nginx, there are 0 application processes for 'foobar.com'. Things will
977
977
  stay that way until someone visits 'foobar.com'. Suppose that there is only 1 visitor.
978
- 1 application instance will be started immediately to serve the visitor, while 2 will
978
+ 1 application process will be started immediately to serve the visitor, while 2 will
979
979
  be spawned in the background. After 10 seconds, when the idle timeout has
980
- been reached, these 3 application instances will not be cleaned up.
980
+ been reached, these 3 application processes will not be cleaned up.
981
981
 
982
982
  Now suppose that there's a sudden spike of traffic, and 100 users visit 'foobar.com'
983
- simultanously. Phusion Passenger will start 12 more application instances. After the idle
983
+ simultanously. Phusion Passenger will start 12 more application processes. After the idle
984
984
  timeout of 10 seconds have passed, Phusion Passenger will clean up 12 application
985
- instances, keeping 3 instances around.
985
+ processes, keeping 3 processes around.
986
986
 
987
987
  The passenger_min_instances option may occur in the following places:
988
988
 
@@ -994,12 +994,12 @@ The passenger_min_instances option may occur in the following places:
994
994
  In each place, it may be specified at most once. The default value is '1'.
995
995
 
996
996
  ==== passenger_max_instances_per_app <integer> ====
997
- The maximum number of application instances that may be simultaneously active
997
+ The maximum number of application processes that may simultaneously exist
998
998
  for a single application. This helps to make sure that a single application
999
999
  will not occupy all available slots in the application pool.
1000
1000
 
1001
1001
  This value must be less than <<PassengerMaxPoolSize,passenger_max_pool_size>>. A value of 0
1002
- means that there is no limit placed on the number of instances a single application
1002
+ means that there is no limit placed on the number of processes a single application
1003
1003
  may use, i.e. only the global limit of <<PassengerMaxPoolSize,passenger_max_pool_size>>
1004
1004
  will be enforced.
1005
1005
 
@@ -1008,8 +1008,8 @@ The default value is '0'.
1008
1008
 
1009
1009
  [[PassengerPoolIdleTime]]
1010
1010
  ==== passenger_pool_idle_time <integer> ====
1011
- The maximum number of seconds that an application instance may be idle. That is,
1012
- if an application instance hasn't received any traffic after the given number of
1011
+ The maximum number of seconds that an application process may be idle. That is,
1012
+ if an application process hasn't received any traffic after the given number of
1013
1013
  seconds, then it will be shutdown in order to conserve memory.
1014
1014
 
1015
1015
  Decreasing this value means that applications will have to be spawned
@@ -1022,10 +1022,10 @@ Rails/Rack web page. We recommend a value of `2 * x`, where `x` is the average
1022
1022
  number of seconds that a visitor spends on a single Rails/Rack web page. But your
1023
1023
  mileage may vary.
1024
1024
 
1025
- When this value is set to '0', application instances will not be shutdown unless
1025
+ When this value is set to '0', application processes will not be shutdown unless
1026
1026
  it's really necessary, i.e. when Phusion Passenger is out of worker processes
1027
- for a given application and one of the inactive application instances needs to
1028
- make place for another application instance. Setting the value to 0 is
1027
+ for a given application and one of the <<inactive_process,inactive application processes>> needs to
1028
+ make place for another application process. Setting the value to 0 is
1029
1029
  recommended if you're on a non-shared host that's only running a few
1030
1030
  applications, each which must be available at all times.
1031
1031
 
@@ -1034,10 +1034,10 @@ The default value is '300'.
1034
1034
 
1035
1035
  [[PassengerMaxRequests]]
1036
1036
  ==== passenger_max_requests <integer> ====
1037
- The maximum number of requests an application instance will process. After
1038
- serving that many requests, the application instance will be shut down and
1037
+ The maximum number of requests an application process will process. After
1038
+ serving that many requests, the application process will be shut down and
1039
1039
  Phusion Passenger will restart it. A value of 0 means that there is no maximum:
1040
- an application instance will thus be shut down when its idle timeout has been
1040
+ an application process will thus be shut down when its idle timeout has been
1041
1041
  reached.
1042
1042
 
1043
1043
  This option is useful if your application is leaking memory. By shutting
@@ -1063,11 +1063,11 @@ measure to avoid memory leaks.
1063
1063
 
1064
1064
  [[PassengerPreStart]]
1065
1065
  ==== passenger_pre_start <url> ====
1066
- By default, Phusion Passenger does not start any application instances until said
1066
+ By default, Phusion Passenger does not start any application processes until said
1067
1067
  web application is first accessed. The result is that the first visitor of said
1068
1068
  web application might experience a small delay as Phusion Passenger is starting
1069
1069
  the web application on demand. If that is undesirable, then this directive can be
1070
- used to pre-started application instances during Nginx startup.
1070
+ used to pre-started application processes during Nginx startup.
1071
1071
 
1072
1072
  A few things to be careful of:
1073
1073
 
@@ -1081,7 +1081,7 @@ A few things to be careful of:
1081
1081
  * The path part of the URL must point to some URI that the web application
1082
1082
  handles.
1083
1083
  - You will probably want to combine this option with
1084
- <<PassengerMinInstances,passenger_min_instances>> because application instances
1084
+ <<PassengerMinInstances,passenger_min_instances>> because application processes
1085
1085
  started with 'passenger_pre_start' are subject to the usual idle timeout rules.
1086
1086
  See the example below for an explanation.
1087
1087
 
@@ -1167,10 +1167,10 @@ passenger_pre_start http://myblog.com/; # <----- WRONG! Missing "/store" part
1167
1167
 
1168
1168
  ===== Example 3: combining with passenger_min_instances =====
1169
1169
 
1170
- Application instances started with passenger_pre_start are
1170
+ Application processes started with passenger_pre_start are
1171
1171
  also subject to the idle timeout rules as specified by
1172
1172
  <<PassengerPoolIdleTime,passenger_pool_idle_time>>! That means that by default,
1173
- the pre-started application instances for foo.com are bar.com are shut down
1173
+ the pre-started application processes for foo.com are bar.com are shut down
1174
1174
  after a few minutes of inactivity. If you don't want that to happen, then
1175
1175
  you should combine passenger_pre_start with
1176
1176
  <<PassengerMinInstances,passenger_min_instances>>, like this:
@@ -61,3 +61,11 @@ In case of Python (WSGI) applications, this is the directory that contains
61
61
  |
62
62
  +- ...
63
63
  -----------------------------------------
64
+
65
+ [[idle_process]]
66
+ === Idle process ===
67
+ An "idle process" refers to a process that hasn't processed any requests for a while.
68
+
69
+ [[inactive_process]]
70
+ === Inactive process ===
71
+ An "inactive process" refers to a process that's current not processing any requests. An idle process is always inactive, but an inactive process is not always considered idle.
@@ -159,6 +159,7 @@ private:
159
159
  char *filenameBeforeModRewrite;
160
160
  apr_filetype_e oldFileType;
161
161
  const char *handlerBeforeModAutoIndex;
162
+ bool enabled;
162
163
 
163
164
  RequestNote(const DirectoryMapper &m, DirConfig *c)
164
165
  : mapper(m),
@@ -169,6 +170,7 @@ private:
169
170
  filenameBeforeModRewrite = NULL;
170
171
  oldFileType = APR_NOFILE;
171
172
  handlerBeforeModAutoIndex = NULL;
173
+ enabled = true;
172
174
  }
173
175
 
174
176
  ~RequestNote() {
@@ -239,9 +241,25 @@ private:
239
241
  * The existance of a request note means that the handler should be run.
240
242
  */
241
243
  inline RequestNote *getRequestNote(request_rec *r) {
242
- void *note = 0;
243
- apr_pool_userdata_get(&note, "Phusion Passenger", r->pool);
244
- return (RequestNote *) note;
244
+ void *pointer = 0;
245
+ apr_pool_userdata_get(&pointer, "Phusion Passenger", r->pool);
246
+ if (pointer != NULL) {
247
+ RequestNote *note = (RequestNote *) pointer;
248
+ if (OXT_LIKELY(note->enabled)) {
249
+ return note;
250
+ } else {
251
+ return 0;
252
+ }
253
+ } else {
254
+ return 0;
255
+ }
256
+ }
257
+
258
+ void disableRequestNote(request_rec *r) {
259
+ RequestNote *note = getRequestNote(r);
260
+ if (note != NULL) {
261
+ note->enabled = false;
262
+ }
245
263
  }
246
264
 
247
265
  /**
@@ -418,6 +436,7 @@ private:
418
436
  try {
419
437
  if (mapper.getBaseURI() == NULL) {
420
438
  // (B) is not true.
439
+ disableRequestNote(r);
421
440
  return false;
422
441
  }
423
442
  } catch (const FileSystemException &e) {
@@ -441,6 +460,7 @@ private:
441
460
  RequestNote::cleanup, r->pool);
442
461
  return true;
443
462
  } else {
463
+ disableRequestNote(r);
444
464
  return false;
445
465
  }
446
466
  }
@@ -451,6 +471,7 @@ private:
451
471
  FileType fileType = getFileType(filename);
452
472
  if (fileType == FT_REGULAR) {
453
473
  // (C) is true.
474
+ disableRequestNote(r);
454
475
  return false;
455
476
  }
456
477
 
@@ -511,6 +532,7 @@ private:
511
532
  * don't let the handler hook run so that Apache can decide how
512
533
  * to display the error.
513
534
  */
535
+ disableRequestNote(r);
514
536
  return false;
515
537
  }
516
538
  }
@@ -776,7 +798,7 @@ private:
776
798
  ap_pass_brigade(r->output_filters, bb);
777
799
 
778
800
  if (r->connection->aborted) {
779
- P_WARN("Either the vistor clicked on the 'Stop' button in the "
801
+ P_WARN("Either the visitor clicked on the 'Stop' button in the "
780
802
  "web browser, or the visitor's connection has stalled "
781
803
  "and couldn't receive the data that Apache is sending "
782
804
  "to it. As a result, you will probably see a 'Broken Pipe' "
@@ -26,7 +26,7 @@
26
26
  #define _PASSENGER_CONSTANTS_H_
27
27
 
28
28
  /* Don't forget to update lib/phusion_passenger.rb too. */
29
- #define PASSENGER_VERSION "3.0.13"
29
+ #define PASSENGER_VERSION "3.0.14"
30
30
 
31
31
  #define FEEDBACK_FD 3
32
32
 
@@ -25,9 +25,9 @@ module PhusionPassenger
25
25
  ###### Version numbers ######
26
26
 
27
27
  # Phusion Passenger version number. Don't forget to edit ext/common/Constants.h too.
28
- VERSION_STRING = '3.0.13'
28
+ VERSION_STRING = '3.0.14'
29
29
 
30
- PREFERRED_NGINX_VERSION = '1.2.1'
30
+ PREFERRED_NGINX_VERSION = '1.2.2'
31
31
  PREFERRED_PCRE_VERSION = '8.30'
32
32
  STANDALONE_INTERFACE_VERSION = 1
33
33
 
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+ #
1
3
  # Phusion Passenger - http://www.modrails.com/
2
4
  # Copyright (c) 2010 Phusion
3
5
  #
@@ -251,6 +253,7 @@ private
251
253
  File.open(filename, 'rb') do |f|
252
254
  IO.popen("tar xzf -", "w") do |io|
253
255
  buffer = ''
256
+ buffer = buffer.force_encoding('binary') if buffer.respond_to?(:force_encoding)
254
257
  total_size = File.size(filename)
255
258
  bytes_read = 0
256
259
  yield(bytes_read, total_size)
@@ -27,7 +27,7 @@
27
27
  master_process on;
28
28
  worker_processes 1;
29
29
  daemon on;
30
- error_log '<%= @options[:log_file] %>' info;
30
+ error_log '<%= @options[:log_file] %>' <% if debugging? %>info<% end %>;
31
31
  pid '<%= @options[:pid_file] %>';
32
32
  <% if @options[:user] %>user <%= @options[:user] %> <%= default_group_for(@options[:user]) %>;<% end %>
33
33
 
@@ -340,15 +340,6 @@ protected
340
340
  # If the app is using Bundler then any dependencies required past this
341
341
  # point must be specified in the Gemfile. Like ruby-debug if debugging is on...
342
342
 
343
- if options["debugger"]
344
- require 'ruby-debug'
345
- if !Debugger.respond_to?(:ctrl_port)
346
- raise "Your version of ruby-debug is too old. Please upgrade to the latest version."
347
- end
348
- Debugger.start_remote('127.0.0.1', [0, 0])
349
- Debugger.start
350
- end
351
-
352
343
  PhusionPassenger._spawn_options = options
353
344
  end
354
345
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passenger
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
- - 13
10
- version: 3.0.13
9
+ - 14
10
+ version: 3.0.14
11
11
  platform: ruby
12
12
  authors:
13
13
  - Phusion - http://www.phusion.nl/
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-06-14 00:00:00 Z
18
+ date: 2012-07-22 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rake
@@ -232,7 +232,6 @@ files:
232
232
  - bin/passenger-memory-stats
233
233
  - bin/passenger-status
234
234
  - doc/ApplicationPool algorithm.txt
235
- - doc/Architectural overview.html
236
235
  - doc/Architectural overview.idmap.txt
237
236
  - doc/Architectural overview.txt
238
237
  - doc/definitions.h
@@ -276,16 +275,12 @@ files:
276
275
  - doc/images/spawn_server_architecture.svg
277
276
  - doc/images/typical_isolated_web_application.png
278
277
  - doc/images/typical_isolated_web_application.svg
279
- - doc/Security of user switching support.html
280
278
  - doc/Security of user switching support.idmap.txt
281
279
  - doc/Security of user switching support.txt
282
- - doc/Users guide Apache.html
283
280
  - doc/Users guide Apache.idmap.txt
284
281
  - doc/Users guide Apache.txt
285
- - doc/Users guide Nginx.html
286
282
  - doc/Users guide Nginx.idmap.txt
287
283
  - doc/Users guide Nginx.txt
288
- - doc/Users guide Standalone.html
289
284
  - doc/Users guide Standalone.idmap.txt
290
285
  - doc/Users guide Standalone.txt
291
286
  - doc/users_guide_snippets/analysis_and_system_maintenance.txt
@@ -1080,7 +1075,6 @@ files:
1080
1075
  - ext/libev/ltmain.sh
1081
1076
  - ext/libev/missing
1082
1077
  - ext/libev/mkinstalldirs
1083
- - ext/libev/config.h
1084
1078
  - ext/libev/ev++.h
1085
1079
  - ext/libev/ev.h
1086
1080
  - ext/libev/ev_vars.h
@@ -1508,11 +1502,15 @@ files:
1508
1502
  - test/stub/vendor_rails/minimal/railties/lib/ruby_version_check.rb
1509
1503
  - test/stub/vendor_rails/minimal/README
1510
1504
  - test/stub/wsgi/passenger_wsgi.py
1511
- - test/stub/wsgi/passenger_wsgi.pyc
1512
1505
  - test/stub/wsgi/public/wsgi-snake.jpg
1513
1506
  - test/stub/zsfa/header.png
1514
1507
  - test/stub/zsfa/index.html
1515
1508
  - test/stub/zsfa/zsfa.png
1509
+ - doc/Users guide Apache.html
1510
+ - doc/Users guide Nginx.html
1511
+ - doc/Users guide Standalone.html
1512
+ - doc/Security of user switching support.html
1513
+ - doc/Architectural overview.html
1516
1514
  homepage: http://www.modrails.com/
1517
1515
  licenses: []
1518
1516
 
@@ -1,122 +0,0 @@
1
- /* config.h. Generated from config.h.in by configure. */
2
- /* config.h.in. Generated from configure.ac by autoheader. */
3
-
4
- /* Define to 1 if you have the `clock_gettime' function. */
5
- /* #undef HAVE_CLOCK_GETTIME */
6
-
7
- /* "use syscall interface for clock_gettime" */
8
- /* #undef HAVE_CLOCK_SYSCALL */
9
-
10
- /* Define to 1 if you have the <dlfcn.h> header file. */
11
- #define HAVE_DLFCN_H 1
12
-
13
- /* Define to 1 if you have the `epoll_ctl' function. */
14
- /* #undef HAVE_EPOLL_CTL */
15
-
16
- /* Define to 1 if you have the `eventfd' function. */
17
- /* #undef HAVE_EVENTFD */
18
-
19
- /* Define to 1 if you have the `inotify_init' function. */
20
- /* #undef HAVE_INOTIFY_INIT */
21
-
22
- /* Define to 1 if you have the <inttypes.h> header file. */
23
- #define HAVE_INTTYPES_H 1
24
-
25
- /* Define to 1 if you have the `kqueue' function. */
26
- #define HAVE_KQUEUE 1
27
-
28
- /* Define to 1 if you have the `m' library (-lm). */
29
- #define HAVE_LIBM 1
30
-
31
- /* Define to 1 if you have the `rt' library (-lrt). */
32
- /* #undef HAVE_LIBRT */
33
-
34
- /* Define to 1 if you have the <memory.h> header file. */
35
- #define HAVE_MEMORY_H 1
36
-
37
- /* Define to 1 if you have the `nanosleep' function. */
38
- /* #undef HAVE_NANOSLEEP */
39
-
40
- /* Define to 1 if you have the `poll' function. */
41
- #define HAVE_POLL 1
42
-
43
- /* Define to 1 if you have the <poll.h> header file. */
44
- #define HAVE_POLL_H 1
45
-
46
- /* Define to 1 if you have the `port_create' function. */
47
- /* #undef HAVE_PORT_CREATE */
48
-
49
- /* Define to 1 if you have the <port.h> header file. */
50
- /* #undef HAVE_PORT_H */
51
-
52
- /* Define to 1 if you have the `select' function. */
53
- #define HAVE_SELECT 1
54
-
55
- /* Define to 1 if you have the `signalfd' function. */
56
- /* #undef HAVE_SIGNALFD */
57
-
58
- /* Define to 1 if you have the <stdint.h> header file. */
59
- #define HAVE_STDINT_H 1
60
-
61
- /* Define to 1 if you have the <stdlib.h> header file. */
62
- #define HAVE_STDLIB_H 1
63
-
64
- /* Define to 1 if you have the <strings.h> header file. */
65
- #define HAVE_STRINGS_H 1
66
-
67
- /* Define to 1 if you have the <string.h> header file. */
68
- #define HAVE_STRING_H 1
69
-
70
- /* Define to 1 if you have the <sys/epoll.h> header file. */
71
- /* #undef HAVE_SYS_EPOLL_H */
72
-
73
- /* Define to 1 if you have the <sys/eventfd.h> header file. */
74
- /* #undef HAVE_SYS_EVENTFD_H */
75
-
76
- /* Define to 1 if you have the <sys/event.h> header file. */
77
- #define HAVE_SYS_EVENT_H 1
78
-
79
- /* Define to 1 if you have the <sys/inotify.h> header file. */
80
- /* #undef HAVE_SYS_INOTIFY_H */
81
-
82
- /* Define to 1 if you have the <sys/queue.h> header file. */
83
- #define HAVE_SYS_QUEUE_H 1
84
-
85
- /* Define to 1 if you have the <sys/select.h> header file. */
86
- #define HAVE_SYS_SELECT_H 1
87
-
88
- /* Define to 1 if you have the <sys/signalfd.h> header file. */
89
- /* #undef HAVE_SYS_SIGNALFD_H */
90
-
91
- /* Define to 1 if you have the <sys/stat.h> header file. */
92
- #define HAVE_SYS_STAT_H 1
93
-
94
- /* Define to 1 if you have the <sys/types.h> header file. */
95
- #define HAVE_SYS_TYPES_H 1
96
-
97
- /* Define to 1 if you have the <unistd.h> header file. */
98
- #define HAVE_UNISTD_H 1
99
-
100
- /* Name of package */
101
- #define PACKAGE "libev"
102
-
103
- /* Define to the address where bug reports for this package should be sent. */
104
- #define PACKAGE_BUGREPORT ""
105
-
106
- /* Define to the full name of this package. */
107
- #define PACKAGE_NAME ""
108
-
109
- /* Define to the full name and version of this package. */
110
- #define PACKAGE_STRING ""
111
-
112
- /* Define to the one symbol short name of this package. */
113
- #define PACKAGE_TARNAME ""
114
-
115
- /* Define to the version of this package. */
116
- #define PACKAGE_VERSION ""
117
-
118
- /* Define to 1 if you have the ANSI C header files. */
119
- #define STDC_HEADERS 1
120
-
121
- /* Version number of package */
122
- #define VERSION "3.9"