passenger 3.0.14 → 3.0.15
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/README +1 -1
- data/doc/Users guide Apache.html +443 -39
- data/doc/Users guide Apache.idmap.txt +52 -38
- data/doc/Users guide Apache.txt +262 -0
- data/doc/Users guide Nginx.html +412 -38
- data/doc/Users guide Nginx.idmap.txt +53 -39
- data/doc/Users guide Nginx.txt +231 -1
- data/doc/users_guide_snippets/analysis_and_system_maintenance.txt +6 -1
- data/ext/common/Constants.h +1 -1
- data/lib/phusion_passenger.rb +1 -1
- data/lib/phusion_passenger/abstract_installer.rb +1 -1
- data/lib/phusion_passenger/packaging.rb +1 -2
- data/lib/phusion_passenger/templates/error_layout.html.erb +4 -4
- metadata +4 -7
- data/bin/passenger-make-enterprisey +0 -82
- data/man/passenger-make-enterprisey.8 +0 -23
@@ -124,81 +124,93 @@
|
|
124
124
|
|
125
125
|
5.10. PassengerBufferResponse <on|off> => passengerbufferresponse-on-off--1y7ilka
|
126
126
|
|
127
|
-
5.11.
|
127
|
+
5.11. PassengerRollingRestarts <on|off> => passengerrollingrestarts
|
128
128
|
|
129
|
-
5.
|
129
|
+
5.12. PassengerResistDeploymentErrors <on|off> => passengerresistdeploymenterrors
|
130
130
|
|
131
|
-
5.
|
131
|
+
5.13. Security options => security-options-1pb75ho
|
132
132
|
|
133
|
-
5.
|
133
|
+
5.13.1. PassengerUserSwitching <on|off> => passengeruserswitching
|
134
134
|
|
135
|
-
5.
|
135
|
+
5.13.2. PassengerUser <username> => passengeruser
|
136
136
|
|
137
|
-
5.
|
137
|
+
5.13.3. PassengerGroup <group name> => passengergroup
|
138
138
|
|
139
|
-
5.
|
139
|
+
5.13.4. PassengerDefaultUser <username> => passengerdefaultuser
|
140
140
|
|
141
|
-
5.
|
141
|
+
5.13.5. PassengerDefaultGroup <group name> => passengerdefaultgroup
|
142
142
|
|
143
|
-
5.
|
143
|
+
5.13.6. PassengerFriendlyErrorPages <on|off> => passengerfriendlyerrorpages
|
144
144
|
|
145
|
-
5.
|
145
|
+
5.14. Resource control and optimization options => resource-control-and-optimization-options-zu2f7u
|
146
146
|
|
147
|
-
5.
|
147
|
+
5.14.1. PassengerMaxPoolSize <integer> => passengermaxpoolsize-integer--am64q8
|
148
148
|
|
149
|
-
5.
|
149
|
+
5.14.10. PassengerPreStart <url> => passengerprestart-url--1dvgku9
|
150
150
|
|
151
|
-
5.
|
151
|
+
5.14.11. PassengerHighPerformance <on|off> => passengerhighperformance-on-off--zgc547
|
152
152
|
|
153
|
-
5.
|
153
|
+
5.14.2. PassengerMinInstances <integer> => passengermininstances-integer--wegq6b
|
154
154
|
|
155
|
-
5.
|
155
|
+
5.14.3. PassengerMaxInstances <integer> => passengermaxinstances
|
156
156
|
|
157
|
-
5.
|
157
|
+
5.14.4. PassengerMaxInstancesPerApp <integer> => passengermaxinstancesperapp
|
158
158
|
|
159
|
-
5.
|
159
|
+
5.14.5. PassengerPoolIdleTime <integer> => passengerpoolidletime-integer--a3gunq
|
160
160
|
|
161
|
-
5.
|
161
|
+
5.14.6. PassengerMaxRequests <integer> => passengermaxrequests
|
162
162
|
|
163
|
-
5.
|
163
|
+
5.14.7. PassengerMaxRequestTime <seconds> => passengermaxrequesttime-seconds--7qnz3x
|
164
164
|
|
165
|
-
5.14.
|
165
|
+
5.14.8. PassengerMemoryLimit <integer> => passengermemorylimit
|
166
166
|
|
167
|
-
5.14.
|
167
|
+
5.14.9. PassengerStatThrottleRate <integer> => passengerstatthrottlerate
|
168
168
|
|
169
|
-
5.
|
169
|
+
5.15. Compatibility options => compatibility-options-8jve5a
|
170
170
|
|
171
|
-
5.15.
|
171
|
+
5.15.1. PassengerResolveSymlinksInDocumentRoot <on|off> => passengerresolvesymlinksindocumentroot-on-off--1r0qcp8
|
172
172
|
|
173
|
-
5.15.
|
173
|
+
5.15.2. PassengerAllowEncodedSlashes <on|off> => passengerallowencodedslashes-on-off--1y3s1ww
|
174
174
|
|
175
|
-
5.
|
175
|
+
5.16. Logging and debugging options => logging-and-debugging-options-el2cuc
|
176
176
|
|
177
|
-
5.
|
177
|
+
5.16.1. PassengerLogLevel <integer> => passengerloglevel-integer--1v67p8l
|
178
178
|
|
179
|
-
5.
|
179
|
+
5.16.2. PassengerDebugLogFile <filename> => passengerdebuglogfile-filename--1tfy4z9
|
180
180
|
|
181
|
-
5.
|
181
|
+
5.16.3. PassengerDebugger <on|off> => passengerdebugger-on-off--1lgdk7g
|
182
182
|
|
183
|
-
5.
|
183
|
+
5.17. Ruby on Rails-specific options => ruby-on-rails-specific-options-1t10wfu
|
184
184
|
|
185
|
-
5.
|
185
|
+
5.17.1. RailsAutoDetect <on|off> => railsautodetect-on-off--tpigsd
|
186
186
|
|
187
|
-
5.
|
187
|
+
5.17.2. RailsBaseURI <uri> => railsbaseuri-uri--1txrw3k
|
188
188
|
|
189
|
-
5.
|
189
|
+
5.17.3. RailsEnv <string> => railsenv-string--1b0xxvu
|
190
190
|
|
191
|
-
5.17.
|
191
|
+
5.17.4. RailsFrameworkSpawnerIdleTime <integer> => railsframeworkspawneridletime-integer--1ai8dgq
|
192
192
|
|
193
|
-
5.17.
|
193
|
+
5.17.5. RailsAppSpawnerIdleTime <integer> => railsappspawneridletime-integer--1awgog1
|
194
194
|
|
195
|
-
5.
|
195
|
+
5.18. Rack-specific options => rack-specific-options-wk9qzt
|
196
196
|
|
197
|
-
5.
|
197
|
+
5.18.1. RackAutoDetect <on|off> => rackautodetect-on-off--vl1lxy
|
198
198
|
|
199
|
-
5.
|
199
|
+
5.18.2. RackBaseURI <uri> => rackbaseuri-uri--1to24pj
|
200
200
|
|
201
|
-
5.
|
201
|
+
5.18.3. RackEnv <string> => rackenv-string--vve9py
|
202
|
+
|
203
|
+
5.19. Deprecated options => deprecated-options-pm9m57
|
204
|
+
|
205
|
+
5.19.1. RailsRuby => railsruby-ht09ei
|
206
|
+
|
207
|
+
5.19.2. RailsUserSwitching => railsuserswitching-1npx8y4
|
208
|
+
|
209
|
+
5.19.3. RailsDefaultUser => railsdefaultuser-19j7n3m
|
210
|
+
|
211
|
+
5.19.4. RailsAllowModRewrite => railsallowmodrewrite-1vkziro
|
212
|
+
|
213
|
+
5.19.5. RailsSpawnMethod => railsspawnmethod-1aljgpa
|
202
214
|
|
203
215
|
5.2. PassengerRuby <filename> => passengerruby-filename--1r3fv73
|
204
216
|
|
@@ -270,6 +282,8 @@
|
|
270
282
|
|
271
283
|
7.4. Accessing individual application processes => accessing-individual-application-processes-1p0j4jb
|
272
284
|
|
285
|
+
7.5. Attaching an IRB console to an application process => attaching-an-irb-console-to-an-application-process-1cma32j
|
286
|
+
|
273
287
|
8. Tips => tips-19cwwf7
|
274
288
|
|
275
289
|
8.1. User switching (security) => user-switching-security--8njx1x
|
data/doc/Users guide Apache.txt
CHANGED
@@ -980,6 +980,72 @@ The <<PassengerBufferResponse,PassengerBufferResponse>> directive should be turn
|
|
980
980
|
if responses can be huge. Because entire responses are buffered in memory when turned on.
|
981
981
|
=====================================================
|
982
982
|
|
983
|
+
[[PassengerRollingRestarts]]
|
984
|
+
=== PassengerRollingRestarts <on|off> ===
|
985
|
+
**Available in Phusion Passenger Enterprise since version 3.0.0.**
|
986
|
+
|
987
|
+
Enables or disables support for rolling restarts. Normally when you
|
988
|
+
restart an application (by touching restart.txt), Phusion Passenger would
|
989
|
+
shut down all application processes and spawn a new one. The spawning
|
990
|
+
of a new application process could take a while, and any requests that
|
991
|
+
come in during this time will be blocked until this first application
|
992
|
+
process has spawned.
|
993
|
+
|
994
|
+
But when rolling restarts are enabled, Phusion Passenger Enterprise will:
|
995
|
+
|
996
|
+
1. Spawn a new process in the background.
|
997
|
+
2. When it's done spawning, Phusion Passenger Enterprise will replace one of the old processes with this newly spawned one.
|
998
|
+
3. Step 1 and 2 are repeated until all processes have been replaced.
|
999
|
+
|
1000
|
+
This way, visitors will not experience any delays when you are restarting your application. This allows you to, for example, upgrade your application often without degrading user experience.
|
1001
|
+
|
1002
|
+
Rolling restarts have a few caveat however that you should be aware of:
|
1003
|
+
|
1004
|
+
- Upgrading an application sometimes involves upgrading the database schema.
|
1005
|
+
With rolling restarts, there may be a point in time during which processes
|
1006
|
+
belonging to the previous version and processes belonging to the new version
|
1007
|
+
both exist at the same time. Any database schema upgrades you perform must
|
1008
|
+
therefore be backwards-compatible with the old application version.
|
1009
|
+
- Because there's no telling which process will serve a request, users may
|
1010
|
+
not see changes brought about by the new version until all processes have
|
1011
|
+
been restarted. It is for this reason that you should not use rolling
|
1012
|
+
restarts in development, only in production.
|
1013
|
+
|
1014
|
+
This option may occur in the following places:
|
1015
|
+
|
1016
|
+
* In the global server configuration.
|
1017
|
+
* In a virtual host configuration block.
|
1018
|
+
* In a `<Directory>` or `<Location>` block.
|
1019
|
+
* In '.htaccess', if `AllowOverride Options` is on.
|
1020
|
+
|
1021
|
+
In each place, it may be specified at most once. The default value is 'off'.
|
1022
|
+
|
1023
|
+
=== PassengerResistDeploymentErrors <on|off> ===
|
1024
|
+
**Available in Phusion Passenger Enterprise since version 3.0.0.**
|
1025
|
+
|
1026
|
+
Enables or disables resistance against deployment errors.
|
1027
|
+
|
1028
|
+
Suppose you've upgraded your application and you've issues a command to restart it (by touching restart.txt), but the application code contains an error that prevents Phusion Passenger from successfully spawning a process (e.g. a syntax error). Phusion Passenger would normally display an error message in response to this.
|
1029
|
+
|
1030
|
+
By enabling deployment error resistance, Phusion Passenger Enterprise would instead do this:
|
1031
|
+
|
1032
|
+
- It passes the request to one of the existing application processes (that belong to the previous version of the application). The visitor will not see a Phusion Passenger process spawning error message.
|
1033
|
+
- It logs the error to the global web server error log file.
|
1034
|
+
- It sets an internal flag so that no processes for this application will be spawned (even when the current traffic would normally result in more processes being spawned) and no processes will be idle cleaned. Processes *could* still be shutdown because of other events, e.g. because their <<PassengerMemoryLimit,memory limit>> have been reached.
|
1035
|
+
|
1036
|
+
This way, visitors will suffer minimally from deployment errors. Phusion Passenger will attempt to restart the application again next time restart.txt is touched.
|
1037
|
+
|
1038
|
+
Enabling deployment error resistance only works if <<PassengerRollingRestarts,rolling restart>> is also enabled.
|
1039
|
+
|
1040
|
+
This option may occur in the following places:
|
1041
|
+
|
1042
|
+
* In the global server configuration.
|
1043
|
+
* In a virtual host configuration block.
|
1044
|
+
* In a `<Directory>` or `<Location>` block.
|
1045
|
+
* In '.htaccess', if `AllowOverride Options` is on.
|
1046
|
+
|
1047
|
+
In each place, it may be specified at most once. The default value is 'off'.
|
1048
|
+
|
983
1049
|
=== Security options ===
|
984
1050
|
|
985
1051
|
[[PassengerUserSwitching]]
|
@@ -1137,6 +1203,36 @@ The PassengerMinInstances option may occur in the following places:
|
|
1137
1203
|
|
1138
1204
|
In each place, it may be specified at most once. The default value is '1'.
|
1139
1205
|
|
1206
|
+
==== PassengerMaxInstances <integer> ====
|
1207
|
+
**Available in Phusion Passenger Enterprise since version 3.0.0.**
|
1208
|
+
|
1209
|
+
The maximum number of application processes that may simultaneously exist
|
1210
|
+
for an application. This helps to make sure that a single application
|
1211
|
+
will not occupy all available slots in the application pool.
|
1212
|
+
|
1213
|
+
This value must be less than <<PassengerMaxPoolSize,PassengerMaxPoolSize>>. A value of 0
|
1214
|
+
means that there is no limit placed on the number of processes a single application
|
1215
|
+
may spawn, i.e. only the global limit of <<PassengerMaxPoolSize,PassengerMaxPoolSize>>
|
1216
|
+
will be enforced.
|
1217
|
+
|
1218
|
+
This option may occur in the following places:
|
1219
|
+
|
1220
|
+
* In the global server configuration.
|
1221
|
+
* In a virtual host configuration block.
|
1222
|
+
|
1223
|
+
In each place, it may be specified at most once. The default value is '0'.
|
1224
|
+
|
1225
|
+
.Practical usage example
|
1226
|
+
[TIP]
|
1227
|
+
===========================================================================
|
1228
|
+
Suppose that you're hosting two web applications on your server, a personal
|
1229
|
+
blog and an e-commerce website. You've set <<PassengerMaxPoolSize,PassengerMaxPoolSize>>
|
1230
|
+
to 10. The e-commerce website is more important to you. You can then set
|
1231
|
+
'PassengerMaxInstances' to 3 for your blog, so that it will never spawn more
|
1232
|
+
than 3 processes, even if it suddenly gets a lot of traffic. Your e-commerce website
|
1233
|
+
on the other hand will be free to spawn up to 10 processes if it gets a lot of traffic.
|
1234
|
+
===========================================================================
|
1235
|
+
|
1140
1236
|
==== PassengerMaxInstancesPerApp <integer> ====
|
1141
1237
|
The maximum number of application processes that may simultaneously exist
|
1142
1238
|
for a single application. This helps to make sure that a single application
|
@@ -1150,6 +1246,40 @@ will be enforced.
|
|
1150
1246
|
This option may only occur once, in the global server configuration.
|
1151
1247
|
The default value is '0'.
|
1152
1248
|
|
1249
|
+
.Practical usage example
|
1250
|
+
[TIP]
|
1251
|
+
===========================================================================
|
1252
|
+
Suppose that you're hosting two blogs (blog A and B) on your server, and that
|
1253
|
+
you've set <<PassengerMaxPoolSize,PassengerMaxPoolSize>> to 10. Under normal
|
1254
|
+
circumstances, if blog A suddenly gets a lot of traffic, then A will use all 10
|
1255
|
+
pool slots. If blog B suddenly gets some traffic, then it will only be able to
|
1256
|
+
use 1 pool slot (forcefully releasing 1 slot from A) until A's traffic has
|
1257
|
+
settled down and it has released more pool slots.
|
1258
|
+
|
1259
|
+
If you consider both blogs equally important, then you can set
|
1260
|
+
'PassengerMaxInstancesPerApp' to 5. This way, both blogs will never use more
|
1261
|
+
than 5 pool slots.
|
1262
|
+
===========================================================================
|
1263
|
+
|
1264
|
+
.Relation with PassengerMaxInstances
|
1265
|
+
[NOTE]
|
1266
|
+
===========================================================================
|
1267
|
+
Unlike <<PassengerMaxInstances,PassengerMaxInstances>>, this configuration
|
1268
|
+
option is global and applies to all applications. 'PassengerMaxInstances' on the
|
1269
|
+
other hand is per-virtual host.
|
1270
|
+
|
1271
|
+
Suppose that you're hosting two web applications on your server, a personal
|
1272
|
+
blog and an e-commerce website. You've set <<PassengerMaxPoolSize,PassengerMaxPoolSize>>
|
1273
|
+
to 10. The e-commerce website is more important to you. You can then set
|
1274
|
+
'PassengerMaxInstances' to 3 for your blog, so that it will never use more than
|
1275
|
+
3 pool slots, even if it suddenly gets a lot of traffic. Your e-commerce website
|
1276
|
+
on the other hand will be free to use up all 10 slots if it gets a lot of traffic.
|
1277
|
+
|
1278
|
+
In summary, 'PassengerMaxInstancesPerApp' divides the pool equally among the
|
1279
|
+
different web applications, while 'PassengerMaxInstances' allows one to divide
|
1280
|
+
the pool unequally, according to each web application's relative importance.
|
1281
|
+
===========================================================================
|
1282
|
+
|
1153
1283
|
[[PassengerPoolIdleTime]]
|
1154
1284
|
==== PassengerPoolIdleTime <integer> ====
|
1155
1285
|
The maximum number of seconds that an application process may be idle. That is,
|
@@ -1205,6 +1335,114 @@ problem in your application rather than relying on these directives as a
|
|
1205
1335
|
measure to avoid memory leaks.
|
1206
1336
|
=====================================================
|
1207
1337
|
|
1338
|
+
[[PassengerMaxRequestTime]]
|
1339
|
+
==== PassengerMaxRequestTime <seconds> ====
|
1340
|
+
**Available in Phusion Passenger Enterprise since version 3.0.0.**
|
1341
|
+
|
1342
|
+
The maximum amount of time, in seconds, that an application process may take
|
1343
|
+
to process a request. If the request takes longer than this amount of time,
|
1344
|
+
then the application process will be forcefully shut down, and possibly
|
1345
|
+
restarted upon the next request. A value of 0 means that there is no time limit.
|
1346
|
+
|
1347
|
+
This option is useful for preventing your application from freezing for an
|
1348
|
+
indefinite period of time.
|
1349
|
+
|
1350
|
+
This option may occur in the following places:
|
1351
|
+
|
1352
|
+
* In the global server configuration.
|
1353
|
+
* In a virtual host configuration block.
|
1354
|
+
* In a `<Directory>` or `<Location>` block.
|
1355
|
+
* In '.htaccess', if `AllowOverride Limits` is on.
|
1356
|
+
|
1357
|
+
In each place, it may be specified at most once. The default value is '0'.
|
1358
|
+
|
1359
|
+
.Example
|
1360
|
+
Suppose that most of your requests are known to finish within 2 seconds.
|
1361
|
+
However, there is one URI, '/expensive_computation', which is known to take up
|
1362
|
+
to 10 seconds. You can then configure Phusion Passenger as follows:
|
1363
|
+
|
1364
|
+
----------------------------------------------
|
1365
|
+
<VirtualHost *:80>
|
1366
|
+
ServerName www.example.com
|
1367
|
+
DocumentRoot /webapps/my_app/public
|
1368
|
+
|
1369
|
+
PassengerMaxRequestTime 2
|
1370
|
+
<Location /expensive_computation>
|
1371
|
+
PassengerMaxRequestTime 10
|
1372
|
+
</Location>
|
1373
|
+
</VirtualHost>
|
1374
|
+
----------------------------------------------
|
1375
|
+
|
1376
|
+
If a request to '/expensive_computation' takes more than 10 seconds,
|
1377
|
+
or if a request to any other URI takes more than 2 seconds,
|
1378
|
+
then the corresponding application process will be forced to shutdown.
|
1379
|
+
|
1380
|
+
[CAUTION]
|
1381
|
+
=====================================================
|
1382
|
+
The <<PassengerMaxRequestTime,PassengerMaxRequestTime>> directive should be
|
1383
|
+
considered as a workaround for misbehaving applications. It is advised that you
|
1384
|
+
fix the problem in your application rather than relying on these directives as a
|
1385
|
+
measure to avoid freezing applications.
|
1386
|
+
=====================================================
|
1387
|
+
|
1388
|
+
[[PassengerMemoryLimit]]
|
1389
|
+
==== PassengerMemoryLimit <integer> ====
|
1390
|
+
**Available in Phusion Passenger Enterprise since version 3.0.0.**
|
1391
|
+
|
1392
|
+
The maximum amount of memory that an application process may use, in megabytes.
|
1393
|
+
Once an application process has surpassed its memory limit, it will process
|
1394
|
+
all the requests currently present in its queue and then shut down.
|
1395
|
+
A value of 0 means that there is no maximum: the application's memory usage
|
1396
|
+
will not be checked.
|
1397
|
+
|
1398
|
+
This option is useful if your application is leaking memory. By shutting
|
1399
|
+
it down, all of its memory is guaranteed to be freed by the operating system.
|
1400
|
+
|
1401
|
+
This option may occur in the following places:
|
1402
|
+
|
1403
|
+
* In the global server configuration.
|
1404
|
+
* In a virtual host configuration block.
|
1405
|
+
* In a `<Directory>` or `<Location>` block.
|
1406
|
+
* In '.htaccess', if `AllowOverride Limits` is on.
|
1407
|
+
|
1408
|
+
In each place, it may be specified at most once. The default value is '200'.
|
1409
|
+
|
1410
|
+
[NOTE]
|
1411
|
+
.A word about permissions
|
1412
|
+
=====================================================
|
1413
|
+
The <<PassengerMemoryLimit,PassengerMemoryLimit>> directive requires that the
|
1414
|
+
user that the application is running as (see <<PassengerUserSwitching,PassengerUserSwitching>>)
|
1415
|
+
to have access to the `/proc` file system, or to be able to inspect its status
|
1416
|
+
with `ps` (which on Linux and FreeBSD systems basically means the same thing, since `ps`
|
1417
|
+
reads process information from `/proc`). Therefore, on servers running with
|
1418
|
+
tight permissions on `/proc`, this directive may not work. If you wish to use
|
1419
|
+
this directive and your `/proc` permissions are too tight, then please consider
|
1420
|
+
untightening the permissions.
|
1421
|
+
=====================================================
|
1422
|
+
|
1423
|
+
[TIP]
|
1424
|
+
.FreeBSD and `/proc`
|
1425
|
+
=====================================================
|
1426
|
+
On many FreeBSD systems, `/proc` is not mounted by default. `/proc` *must* be
|
1427
|
+
mounted in order for <<PassengerMemoryLimit,PassengerMemoryLimit>> to work.
|
1428
|
+
|
1429
|
+
It is also advised that you mount `/proc` with the `linprocfs` filesystem type
|
1430
|
+
instead of the regular FreeBSD `proc` filesystem type. The `linprocfs` filesystem
|
1431
|
+
type allows Phusion Passenger to read memory information from `/proc` directly,
|
1432
|
+
which is very fast. If you mount `/proc` with a different filesystem type, then
|
1433
|
+
Phusion Passenger must resort to querying memory information from the `ps` command,
|
1434
|
+
which is a lot slower.
|
1435
|
+
=====================================================
|
1436
|
+
|
1437
|
+
[CAUTION]
|
1438
|
+
=====================================================
|
1439
|
+
The <<PassengerMaxRequests,PassengerMaxRequests>> and
|
1440
|
+
<<PassengerMemoryLimit,PassengerMemoryLimit>> directives should be considered
|
1441
|
+
as workarounds for misbehaving applications. It is advised that you fix the
|
1442
|
+
problem in your application rather than relying on these directives as a
|
1443
|
+
measure to avoid memory leaks.
|
1444
|
+
=====================================================
|
1445
|
+
|
1208
1446
|
==== PassengerStatThrottleRate <integer> ====
|
1209
1447
|
By default, Phusion Passenger performs several filesystem checks (or, in
|
1210
1448
|
programmers jargon, 'stat() calls') each time a request is processed:
|
@@ -1605,6 +1843,30 @@ error messages should be written to instead.
|
|
1605
1843
|
|
1606
1844
|
This option may only occur once, in the global server configuration.
|
1607
1845
|
|
1846
|
+
==== PassengerDebugger <on|off> ====
|
1847
|
+
**Available in Phusion Passenger Enterprise since version 3.0.0.**
|
1848
|
+
|
1849
|
+
Turns support for application debugging on or off. In case of Ruby applications,
|
1850
|
+
turning this option on will cause them to load the `ruby-debug` gem (when on Ruby 1.8)
|
1851
|
+
or the `debugger` gem (when on Ruby 1.9). If you're using Bundler, you should add
|
1852
|
+
this to your Gemfile:
|
1853
|
+
|
1854
|
+
-------------------------------------------
|
1855
|
+
gem 'ruby-debug', :platforms => :ruby_18
|
1856
|
+
gem 'debugger', :platforms => :ruby_19
|
1857
|
+
-------------------------------------------
|
1858
|
+
|
1859
|
+
Once debugging is turned on, you can use the command `passenger-irb --debug <PID>` to attach an rdebug console to the application process with the given PID. Attaching will succeed once the application process executes a `debugger` command.
|
1860
|
+
|
1861
|
+
This option may occur in the following places:
|
1862
|
+
|
1863
|
+
* In the global server configuration.
|
1864
|
+
* In a virtual host configuration block.
|
1865
|
+
* In a `<Directory>` or `<Location>` block.
|
1866
|
+
* In '.htaccess', if `AllowOverride Options` is on.
|
1867
|
+
|
1868
|
+
In each place, it may be specified at most once. The default value is 'off'.
|
1869
|
+
|
1608
1870
|
|
1609
1871
|
=== Ruby on Rails-specific options ===
|
1610
1872
|
|
data/doc/Users guide Nginx.html
CHANGED
@@ -1989,9 +1989,132 @@ In an <em>if</em> configuration scope.
|
|
1989
1989
|
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>smart-lv2</em>.</p></div>
|
1990
1990
|
</div>
|
1991
1991
|
<div class="sect2">
|
1992
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="
|
1992
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="PassengerRollingRestarts" data-comment-topic="passenger-rolling-restarts">5.4. passenger_rolling_restarts <on|off></h3>
|
1993
|
+
<div class="paragraph"><p><strong>Available in Phusion Passenger Enterprise since version 3.0.0.</strong></p></div>
|
1994
|
+
<div class="paragraph"><p>Enables or disables support for rolling restarts. Normally when you
|
1995
|
+
restart an application (by touching restart.txt), Phusion Passenger would
|
1996
|
+
shut down all application processes and spawn a new one. The spawning
|
1997
|
+
of a new application process could take a while, and any requests that
|
1998
|
+
come in during this time will be blocked until this first application
|
1999
|
+
process has spawned.</p></div>
|
2000
|
+
<div class="paragraph"><p>But when rolling restarts are enabled, Phusion Passenger Enterprise will:</p></div>
|
2001
|
+
<div class="olist arabic"><ol class="arabic">
|
2002
|
+
<li>
|
2003
|
+
<p>
|
2004
|
+
Spawn a new process in the background.
|
2005
|
+
</p>
|
2006
|
+
</li>
|
2007
|
+
<li>
|
2008
|
+
<p>
|
2009
|
+
When it’s done spawning, Phusion Passenger Enterprise will replace one of the old processes with this newly spawned one.
|
2010
|
+
</p>
|
2011
|
+
</li>
|
2012
|
+
<li>
|
2013
|
+
<p>
|
2014
|
+
Step 1 and 2 are repeated until all processes have been replaced.
|
2015
|
+
</p>
|
2016
|
+
</li>
|
2017
|
+
</ol></div>
|
2018
|
+
<div class="paragraph"><p>This way, visitors will not experience any delays when you are restarting your application. This allows you to, for example, upgrade your application often without degrading user experience.</p></div>
|
2019
|
+
<div class="paragraph"><p>Rolling restarts have a few caveat however that you should be aware of:</p></div>
|
2020
|
+
<div class="ulist"><ul>
|
2021
|
+
<li>
|
2022
|
+
<p>
|
2023
|
+
Upgrading an application sometimes involves upgrading the database schema.
|
2024
|
+
With rolling restarts, there may be a point in time during which processes
|
2025
|
+
belonging to the previous version and processes belonging to the new version
|
2026
|
+
both exist at the same time. Any database schema upgrades you perform must
|
2027
|
+
therefore be backwards-compatible with the old application version.
|
2028
|
+
</p>
|
2029
|
+
</li>
|
2030
|
+
<li>
|
2031
|
+
<p>
|
2032
|
+
Because there’s no telling which process will serve a request, users may
|
2033
|
+
not see changes brought about by the new version until all processes have
|
2034
|
+
been restarted. It is for this reason that you should not use rolling
|
2035
|
+
restarts in development, only in production.
|
2036
|
+
</p>
|
2037
|
+
</li>
|
2038
|
+
</ul></div>
|
2039
|
+
<div class="paragraph"><p>This option may occur in the following places:</p></div>
|
2040
|
+
<div class="ulist"><ul>
|
2041
|
+
<li>
|
2042
|
+
<p>
|
2043
|
+
In the <em>http</em> configuration block.
|
2044
|
+
</p>
|
2045
|
+
</li>
|
2046
|
+
<li>
|
2047
|
+
<p>
|
2048
|
+
In a <em>server</em> configuration block.
|
2049
|
+
</p>
|
2050
|
+
</li>
|
2051
|
+
<li>
|
2052
|
+
<p>
|
2053
|
+
In a <em>location</em> configuration block.
|
2054
|
+
</p>
|
2055
|
+
</li>
|
2056
|
+
<li>
|
2057
|
+
<p>
|
2058
|
+
In an <em>if</em> configuration scope.
|
2059
|
+
</p>
|
2060
|
+
</li>
|
2061
|
+
</ul></div>
|
2062
|
+
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>off</em>.</p></div>
|
2063
|
+
</div>
|
2064
|
+
<div class="sect2">
|
2065
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_passenger_resist_deployment_errors_lt_on_off_gt" data-comment-topic="passenger-resist-deployment-errors-on-off--k9yf1">5.5. passenger_resist_deployment_errors <on|off></h3>
|
2066
|
+
<div class="paragraph"><p><strong>Available in Phusion Passenger Enterprise since version 3.0.0.</strong></p></div>
|
2067
|
+
<div class="paragraph"><p>Enables or disables resistance against deployment errors.</p></div>
|
2068
|
+
<div class="paragraph"><p>Suppose you’ve upgraded your application and you’ve issues a command to restart it (by touching restart.txt), but the application code contains an error that prevents Phusion Passenger from successfully spawning a process (e.g. a syntax error). Phusion Passenger would normally display an error message in response to this.</p></div>
|
2069
|
+
<div class="paragraph"><p>By enabling deployment error resistance, Phusion Passenger Enterprise would instead do this:</p></div>
|
2070
|
+
<div class="ulist"><ul>
|
2071
|
+
<li>
|
2072
|
+
<p>
|
2073
|
+
It passes the request to one of the existing application processes (that belong to the previous version of the application). The visitor will not see a Phusion Passenger process spawning error message.
|
2074
|
+
</p>
|
2075
|
+
</li>
|
2076
|
+
<li>
|
2077
|
+
<p>
|
2078
|
+
It logs the error to the global web server error log file.
|
2079
|
+
</p>
|
2080
|
+
</li>
|
2081
|
+
<li>
|
2082
|
+
<p>
|
2083
|
+
It sets an internal flag so that no processes for this application will be spawned (even when the current traffic would normally result in more processes being spawned) and no processes will be idle cleaned. Processes <strong>could</strong> still be shutdown because of other events, e.g. because their <a href="#PassengerMemoryLimit">memory limit</a> have been reached.
|
2084
|
+
</p>
|
2085
|
+
</li>
|
2086
|
+
</ul></div>
|
2087
|
+
<div class="paragraph"><p>This way, visitors will suffer minimally from deployment errors. Phusion Passenger will attempt to restart the application again next time restart.txt is touched.</p></div>
|
2088
|
+
<div class="paragraph"><p>Enabling deployment error resistance only works if <a href="#PassengerRollingRestarts">rolling restart</a> is also enabled.</p></div>
|
2089
|
+
<div class="paragraph"><p>This option may occur in the following places:</p></div>
|
2090
|
+
<div class="ulist"><ul>
|
2091
|
+
<li>
|
2092
|
+
<p>
|
2093
|
+
In the <em>http</em> configuration block.
|
2094
|
+
</p>
|
2095
|
+
</li>
|
2096
|
+
<li>
|
2097
|
+
<p>
|
2098
|
+
In a <em>server</em> configuration block.
|
2099
|
+
</p>
|
2100
|
+
</li>
|
2101
|
+
<li>
|
2102
|
+
<p>
|
2103
|
+
In a <em>location</em> configuration block.
|
2104
|
+
</p>
|
2105
|
+
</li>
|
2106
|
+
<li>
|
2107
|
+
<p>
|
2108
|
+
In an <em>if</em> configuration scope.
|
2109
|
+
</p>
|
2110
|
+
</li>
|
2111
|
+
</ul></div>
|
2112
|
+
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>off</em>.</p></div>
|
2113
|
+
</div>
|
2114
|
+
<div class="sect2">
|
2115
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_important_deployment_options" data-comment-topic="important-deployment-options-av567">5.6. Important deployment options</h3>
|
1993
2116
|
<div class="sect3">
|
1994
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_enabled_lt_on_off_gt" data-comment-topic="passenger-enabled-on-off--1rpb2t7">5.
|
2117
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_enabled_lt_on_off_gt" data-comment-topic="passenger-enabled-on-off--1rpb2t7">5.6.1. passenger_enabled <on|off></h4>
|
1995
2118
|
<div class="paragraph"><p>This option may be specified in the <em>http</em> configuration block, a
|
1996
2119
|
<em>server</em> configuration block, a <em>location</em> configuration block or
|
1997
2120
|
an <em>if</em> configuration scope, to enable or disable Phusion Passenger
|
@@ -2003,7 +2126,7 @@ and <a href="#deploying_a_rack_app">Deploying a Rack-based Ruby application</a>
|
|
2003
2126
|
for examples.</p></div>
|
2004
2127
|
</div>
|
2005
2128
|
<div class="sect3">
|
2006
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerBaseURI" data-comment-topic="passenger-base-uri-uri--1xtuo50">5.
|
2129
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerBaseURI" data-comment-topic="passenger-base-uri-uri--1xtuo50">5.6.2. passenger_base_uri <uri></h4>
|
2007
2130
|
<div class="paragraph"><p>Used to specify that the given URI is an distinct application that should
|
2008
2131
|
be served by Phusion Passenger. This option can be used for both Rails and
|
2009
2132
|
Rack applications. See <a href="#deploying_rails_to_sub_uri">Deploying Rails to a sub URI</a>
|
@@ -2036,9 +2159,9 @@ In an <em>if</em> configuration scope.
|
|
2036
2159
|
</div>
|
2037
2160
|
</div>
|
2038
2161
|
<div class="sect2">
|
2039
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_connection_handling_options" data-comment-topic="connection-handling-options-8jgq90">5.
|
2162
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_connection_handling_options" data-comment-topic="connection-handling-options-8jgq90">5.7. Connection handling options</h3>
|
2040
2163
|
<div class="sect3">
|
2041
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerUseGlobalQueue" data-comment-topic="passenger-use-global-queue-on-off--14h9n22">5.
|
2164
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerUseGlobalQueue" data-comment-topic="passenger-use-global-queue-on-off--14h9n22">5.7.1. passenger_use_global_queue <on|off></h4>
|
2042
2165
|
<div class="paragraph"><p>Turns the use of global queuing on or off.</p></div>
|
2043
2166
|
<div class="paragraph"><p>This option may occur in the following places:</p></div>
|
2044
2167
|
<div class="ulist"><ul>
|
@@ -2145,7 +2268,7 @@ process that becomes available will take from the queue, and so this
|
|
2145
2268
|
“queuing-behind-long-running-request” problem will never occur.</p></div>
|
2146
2269
|
</div>
|
2147
2270
|
<div class="sect3">
|
2148
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_ignore_client_abort_lt_on_off_gt" data-comment-topic="passenger-ignore-client-abort
|
2271
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_ignore_client_abort_lt_on_off_gt" data-comment-topic="passenger-ignore-client-abort">5.7.2. passenger_ignore_client_abort <on|off></h4>
|
2149
2272
|
<div class="paragraph"><p>Normally, when the HTTP client aborts the connection (e.g. when the user clicked on "Stop"
|
2150
2273
|
in the browser), the connection with the application process will be closed too. If the
|
2151
2274
|
application process continues to send its response, then that will result in EPIPE errors
|
@@ -2181,7 +2304,7 @@ In an <em>if</em> configuration scope.
|
|
2181
2304
|
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>off</em>.</p></div>
|
2182
2305
|
</div>
|
2183
2306
|
<div class="sect3">
|
2184
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_set_cgi_param_lt_cgi_environment_name_gt_lt_value_gt" data-comment-topic="passenger-set-cgi-param-cgi-environment-name-value--rx9gc0">5.
|
2307
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_set_cgi_param_lt_cgi_environment_name_gt_lt_value_gt" data-comment-topic="passenger-set-cgi-param-cgi-environment-name-value--rx9gc0">5.7.3. passenger_set_cgi_param <CGI environment name> <value></h4>
|
2185
2308
|
<div class="paragraph"><p>Allows one to define additional CGI environment variables to pass to the backend
|
2186
2309
|
application. This is equivalent to ngx_http_fastcgi_module’s <em>fastcgi_param</em>
|
2187
2310
|
directive, and is comparable to ngx_http_proxy_module’s <em>proxy_set_header</em> option.
|
@@ -2232,7 +2355,7 @@ In an <em>if</em> configuration scope.
|
|
2232
2355
|
</ul></div>
|
2233
2356
|
</div>
|
2234
2357
|
<div class="sect3">
|
2235
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_pass_header_lt_header_name_gt" data-comment-topic="passenger-pass-header-header-name--1cg31je">5.
|
2358
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_pass_header_lt_header_name_gt" data-comment-topic="passenger-pass-header-header-name--1cg31je">5.7.4. passenger_pass_header <header name></h4>
|
2236
2359
|
<div class="paragraph"><p>Some headers generated by backend applications are not forwarded to the HTTP client,
|
2237
2360
|
e.g. <em>X-Accel-Redirect</em> which is directly processed by Nginx and then discarded from
|
2238
2361
|
the final response. This directive allows one to force Nginx to pass those headers
|
@@ -2270,7 +2393,7 @@ In an <em>if</em> configuration scope.
|
|
2270
2393
|
</ul></div>
|
2271
2394
|
</div>
|
2272
2395
|
<div class="sect3">
|
2273
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_buffer_response_lt_on_off_gt" data-comment-topic="passenger-buffer-response
|
2396
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_buffer_response_lt_on_off_gt" data-comment-topic="passenger-buffer-response">5.7.5. passenger_buffer_response <on|off></h4>
|
2274
2397
|
<div class="paragraph"><p>When turned on, application-generated responses are buffered in memory and also on
|
2275
2398
|
disk if the response is larger than a certain threshold. By buffering responses,
|
2276
2399
|
protection is provided against slow HTTP clients that can not read your response
|
@@ -2343,27 +2466,27 @@ In an <em>if</em> configuration scope.
|
|
2343
2466
|
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>on</em>.</p></div>
|
2344
2467
|
</div>
|
2345
2468
|
<div class="sect3">
|
2346
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_buffer_size" data-comment-topic="passenger-buffer-size-1jfkq87">5.
|
2469
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_buffer_size" data-comment-topic="passenger-buffer-size-1jfkq87">5.7.6. passenger_buffer_size</h4>
|
2347
2470
|
</div>
|
2348
2471
|
<div class="sect3">
|
2349
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_buffers" data-comment-topic="passenger-buffers
|
2472
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_buffers" data-comment-topic="passenger-busy-buffers">5.7.7. passenger_buffers</h4>
|
2350
2473
|
</div>
|
2351
2474
|
<div class="sect3">
|
2352
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_busy_buffer_size" data-comment-topic="passenger-busy-buffer-size-
|
2475
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_busy_buffer_size" data-comment-topic="passenger-busy-buffer-size-124sj61">5.7.8. passenger_busy_buffer_size</h4>
|
2353
2476
|
<div class="paragraph"><p>These options have the same effect as proxy_module’s similarly named options.
|
2354
2477
|
They can be used to modify the maximum allowed HTTP header size.</p></div>
|
2355
2478
|
</div>
|
2356
2479
|
</div>
|
2357
2480
|
<div class="sect2">
|
2358
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_security_options" data-comment-topic="security-options-1bv93g4">5.
|
2481
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_security_options" data-comment-topic="security-options-1bv93g4">5.8. Security options</h3>
|
2359
2482
|
<div class="sect3">
|
2360
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerUserSwitching" data-comment-topic="passenger-user-switching-on-off--1p37u3l">5.
|
2483
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerUserSwitching" data-comment-topic="passenger-user-switching-on-off--1p37u3l">5.8.1. passenger_user_switching <on|off></h4>
|
2361
2484
|
<div class="paragraph"><p>Whether to enable <a href="#user_switching">user switching support</a>.</p></div>
|
2362
2485
|
<div class="paragraph"><p>This option may only occur once, in the <em>http</em> configuration block.
|
2363
2486
|
The default value is <em>on</em>.</p></div>
|
2364
2487
|
</div>
|
2365
2488
|
<div class="sect3">
|
2366
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_user_lt_username_gt" data-comment-topic="passenger-user-username--b06ur7">5.
|
2489
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_user_lt_username_gt" data-comment-topic="passenger-user-username--b06ur7">5.8.2. passenger_user <username></h4>
|
2367
2490
|
<div class="paragraph"><p>If <a href="#user_switching">user switching support</a> is enabled, then Phusion Passenger will
|
2368
2491
|
by default run the web application as the owner of the file <em>config/environment.rb</em>
|
2369
2492
|
(for Rails apps) or <em>config.ru</em> (for Rack apps). This option allows you to override
|
@@ -2395,7 +2518,7 @@ In an <em>if</em> configuration scope.
|
|
2395
2518
|
<div class="paragraph"><p>In each place, it may be specified at most once.</p></div>
|
2396
2519
|
</div>
|
2397
2520
|
<div class="sect3">
|
2398
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="
|
2521
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_group_lt_group_name_gt" data-comment-topic="passenger-user-group-name--1fco4j7">5.8.3. passenger_group <group name></h4>
|
2399
2522
|
<div class="paragraph"><p>If <a href="#user_switching">user switching support</a> is enabled, then Phusion Passenger will
|
2400
2523
|
by default run the web application as the primary group of the owner of the file
|
2401
2524
|
<em>config/environment.rb</em> (for Rails apps) or <em>config.ru</em> (for Rack apps). This option
|
@@ -2429,7 +2552,7 @@ In an <em>if</em> configuration scope.
|
|
2429
2552
|
<div class="paragraph"><p>In each place, it may be specified at most once.</p></div>
|
2430
2553
|
</div>
|
2431
2554
|
<div class="sect3">
|
2432
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerDefaultUser" data-comment-topic="passenger-default-user-username--1h6cdmf">5.
|
2555
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerDefaultUser" data-comment-topic="passenger-default-user-username--1h6cdmf">5.8.4. passenger_default_user <username></h4>
|
2433
2556
|
<div class="paragraph"><p>Phusion Passenger enables <a href="#user_switching">user switching support</a> by default.
|
2434
2557
|
This configuration option allows one to specify the user that applications must
|
2435
2558
|
run as, if user switching fails or is disabled.</p></div>
|
@@ -2437,7 +2560,7 @@ run as, if user switching fails or is disabled.</p></div>
|
|
2437
2560
|
The default value is <em>nobody</em>.</p></div>
|
2438
2561
|
</div>
|
2439
2562
|
<div class="sect3">
|
2440
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerDefaultGroup" data-comment-topic="passenger-default-group-group-name--1qxn2qa">5.
|
2563
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerDefaultGroup" data-comment-topic="passenger-default-group-group-name--1qxn2qa">5.8.5. Passenger_default_group <group name></h4>
|
2441
2564
|
<div class="paragraph"><p>Phusion Passenger enables <a href="#user_switching">user switching support</a> by default.
|
2442
2565
|
This configuration option allows one to specify the group that applications must
|
2443
2566
|
run as, if user switching fails or is disabled.</p></div>
|
@@ -2446,7 +2569,7 @@ The default value is the primary group of the user specifified by
|
|
2446
2569
|
<a href="#PassengerDefaultUser">passenger_default_user</a>.</p></div>
|
2447
2570
|
</div>
|
2448
2571
|
<div class="sect3">
|
2449
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_friendly_error_pages_lt_on_off_gt" data-comment-topic="passenger-friendly-error-pages-on-off--
|
2572
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_friendly_error_pages_lt_on_off_gt" data-comment-topic="passenger-friendly-error-pages-on-off--1ti1a0e">5.8.6. passenger_friendly_error_pages <on|off></h4>
|
2450
2573
|
<div class="paragraph"><p>Phusion Passenger can display friendly error pages whenever an application fails
|
2451
2574
|
to start. This friendly error page presents the startup error message, some
|
2452
2575
|
suggestions for solving the problem, and a backtrace. This feature is very useful
|
@@ -2481,9 +2604,9 @@ In an <em>if</em> configuration scope.
|
|
2481
2604
|
</div>
|
2482
2605
|
</div>
|
2483
2606
|
<div class="sect2">
|
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.
|
2607
|
+
<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.9. Resource control and optimization options</h3>
|
2485
2608
|
<div class="sect3">
|
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.
|
2609
|
+
<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.9.1. passenger_max_pool_size <integer></h4>
|
2487
2610
|
<div class="paragraph"><p>The maximum number of <a href="#application_process">application processes</a> that may
|
2488
2611
|
simultanously exist. A larger number results in higher memory usage,
|
2489
2612
|
but improved ability to handle concurrent HTTP clients.</p></div>
|
@@ -2510,7 +2633,7 @@ by about 33%, and it’s not hard to install.</td>
|
|
2510
2633
|
</div>
|
2511
2634
|
</div>
|
2512
2635
|
<div class="sect3">
|
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.
|
2636
|
+
<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.9.2. passenger_min_instances <integer></h4>
|
2514
2637
|
<div class="paragraph"><p>This specifies the minimum number of application processes that should exist for a
|
2515
2638
|
given application. You should set this option to a
|
2516
2639
|
non-zero value if you want to avoid potentially long startup times after a website
|
@@ -2585,7 +2708,58 @@ In an <em>if</em> configuration scope.
|
|
2585
2708
|
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>1</em>.</p></div>
|
2586
2709
|
</div>
|
2587
2710
|
<div class="sect3">
|
2588
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="
|
2711
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_max_instances_lt_integer_gt" data-comment-topic="passenger-max-instances">5.9.3. passenger_max_instances <integer></h4>
|
2712
|
+
<div class="paragraph"><p><strong>Available in Phusion Passenger Enterprise since version 3.0.0.</strong></p></div>
|
2713
|
+
<div class="paragraph"><p>The maximum number of application processes that may simultaneously exist
|
2714
|
+
for an application. This helps to make sure that a single application
|
2715
|
+
will not occupy all available slots in the application pool.</p></div>
|
2716
|
+
<div class="paragraph"><p>This value must be less than <a href="#PassengerMaxPoolSize">passenger_max_pool_size</a>. A value of 0
|
2717
|
+
means that there is no limit placed on the number of processes a single application
|
2718
|
+
may spawn, i.e. only the global limit of <a href="#PassengerMaxPoolSize">passenger_max_pool_size</a>
|
2719
|
+
will be enforced.</p></div>
|
2720
|
+
<div class="paragraph"><p>This option may occur in the following places:</p></div>
|
2721
|
+
<div class="ulist"><ul>
|
2722
|
+
<li>
|
2723
|
+
<p>
|
2724
|
+
In the <em>http</em> configuration block.
|
2725
|
+
</p>
|
2726
|
+
</li>
|
2727
|
+
<li>
|
2728
|
+
<p>
|
2729
|
+
In a <em>server</em> configuration block.
|
2730
|
+
</p>
|
2731
|
+
</li>
|
2732
|
+
<li>
|
2733
|
+
<p>
|
2734
|
+
In a <em>location</em> configuration block.
|
2735
|
+
</p>
|
2736
|
+
</li>
|
2737
|
+
<li>
|
2738
|
+
<p>
|
2739
|
+
In an <em>if</em> configuration scope.
|
2740
|
+
</p>
|
2741
|
+
</li>
|
2742
|
+
</ul></div>
|
2743
|
+
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>0</em>.</p></div>
|
2744
|
+
<div class="admonitionblock">
|
2745
|
+
<table><tr>
|
2746
|
+
<td class="icon">
|
2747
|
+
<img src="./images/icons/tip.png" alt="Tip">
|
2748
|
+
</td>
|
2749
|
+
<td class="content">
|
2750
|
+
<div class="title">Practical usage example</div>
|
2751
|
+
<div class="paragraph"><p>Suppose that you’re hosting two web applications on your server, a personal
|
2752
|
+
blog and an e-commerce website. You’ve set <a href="#PassengerMaxPoolSize">passenger_max_pool_size</a>
|
2753
|
+
to 10. The e-commerce website is more important to you. You can then set
|
2754
|
+
<em>passenger_max_instances</em> to 3 for your blog, so that it will never spawn more
|
2755
|
+
than 3 processes, even if it suddenly gets a lot of traffic. Your e-commerce website
|
2756
|
+
on the other hand will be free to spawn up to 10 processes if it gets a lot of traffic.</p></div>
|
2757
|
+
</td>
|
2758
|
+
</tr></table>
|
2759
|
+
</div>
|
2760
|
+
</div>
|
2761
|
+
<div class="sect3">
|
2762
|
+
<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--1xhbbne">5.9.4. passenger_max_instances_per_app <integer></h4>
|
2589
2763
|
<div class="paragraph"><p>The maximum number of application processes that may simultaneously exist
|
2590
2764
|
for a single application. This helps to make sure that a single application
|
2591
2765
|
will not occupy all available slots in the application pool.</p></div>
|
@@ -2597,7 +2771,7 @@ will be enforced.</p></div>
|
|
2597
2771
|
The default value is <em>0</em>.</p></div>
|
2598
2772
|
</div>
|
2599
2773
|
<div class="sect3">
|
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.
|
2774
|
+
<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.9.5. passenger_pool_idle_time <integer></h4>
|
2601
2775
|
<div class="paragraph"><p>The maximum number of seconds that an application process may be idle. That is,
|
2602
2776
|
if an application process hasn’t received any traffic after the given number of
|
2603
2777
|
seconds, then it will be shutdown in order to conserve memory.</p></div>
|
@@ -2619,7 +2793,7 @@ applications, each which must be available at all times.</p></div>
|
|
2619
2793
|
The default value is <em>300</em>.</p></div>
|
2620
2794
|
</div>
|
2621
2795
|
<div class="sect3">
|
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
|
2796
|
+
<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">5.9.6. passenger_max_requests <integer></h4>
|
2623
2797
|
<div class="paragraph"><p>The maximum number of requests an application process will process. After
|
2624
2798
|
serving that many requests, the application process will be shut down and
|
2625
2799
|
Phusion Passenger will restart it. A value of 0 means that there is no maximum:
|
@@ -2667,7 +2841,163 @@ measure to avoid memory leaks.</p></div>
|
|
2667
2841
|
</div>
|
2668
2842
|
</div>
|
2669
2843
|
<div class="sect3">
|
2670
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="
|
2844
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerMaxRequestTime" data-comment-topic="passenger-max-request-time-seconds--1qod9kg">5.9.7. passenger_max_request_time <seconds></h4>
|
2845
|
+
<div class="paragraph"><p><strong>Available in Phusion Passenger Enterprise since version 3.0.0.</strong></p></div>
|
2846
|
+
<div class="paragraph"><p>The maximum amount of time, in seconds, that an application process may take
|
2847
|
+
to process a request. If the request takes longer than this amount of time,
|
2848
|
+
then the application process will be forcefully shut down, and possibly
|
2849
|
+
restarted upon the next request. A value of 0 means that there is no time limit.</p></div>
|
2850
|
+
<div class="paragraph"><p>This option is useful for preventing your application from freezing for an
|
2851
|
+
indefinite period of time.</p></div>
|
2852
|
+
<div class="paragraph"><p>This option may occur in the following places:</p></div>
|
2853
|
+
<div class="ulist"><ul>
|
2854
|
+
<li>
|
2855
|
+
<p>
|
2856
|
+
In the <em>http</em> configuration block.
|
2857
|
+
</p>
|
2858
|
+
</li>
|
2859
|
+
<li>
|
2860
|
+
<p>
|
2861
|
+
In a <em>server</em> configuration block.
|
2862
|
+
</p>
|
2863
|
+
</li>
|
2864
|
+
<li>
|
2865
|
+
<p>
|
2866
|
+
In a <em>location</em> configuration block.
|
2867
|
+
</p>
|
2868
|
+
</li>
|
2869
|
+
<li>
|
2870
|
+
<p>
|
2871
|
+
In an <em>if</em> configuration scope.
|
2872
|
+
</p>
|
2873
|
+
</li>
|
2874
|
+
</ul></div>
|
2875
|
+
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>0</em>.</p></div>
|
2876
|
+
<div class="paragraph">
|
2877
|
+
<div class="title">Example</div>
|
2878
|
+
<p>Suppose that most of your requests are known to finish within 2 seconds.
|
2879
|
+
However, there is one URI, <em>/expensive_computation</em>, which is known to take up
|
2880
|
+
to 10 seconds. You can then configure Phusion Passenger as follows:</p>
|
2881
|
+
</div>
|
2882
|
+
<div class="listingblock">
|
2883
|
+
<div class="content monospaced">
|
2884
|
+
<pre>server {
|
2885
|
+
listen 80;
|
2886
|
+
server_name www.example.com;
|
2887
|
+
root /webapps/my_app/public;
|
2888
|
+
passenger_enabled on;
|
2889
|
+
passenger_max_request_time 2;
|
2890
|
+
location /expensive_compuation {
|
2891
|
+
passenger_enabled on;
|
2892
|
+
passenger_max_request_time 10;
|
2893
|
+
}
|
2894
|
+
}</pre>
|
2895
|
+
</div>
|
2896
|
+
</div>
|
2897
|
+
<div class="paragraph"><p>If a request to <em>/expensive_computation</em> takes more than 10 seconds,
|
2898
|
+
or if a request to any other URI takes more than 2 seconds,
|
2899
|
+
then the corresponding application process will be forced to shutdown.</p></div>
|
2900
|
+
<div class="admonitionblock">
|
2901
|
+
<table><tr>
|
2902
|
+
<td class="icon">
|
2903
|
+
<img src="./images/icons/caution.png" alt="Caution">
|
2904
|
+
</td>
|
2905
|
+
<td class="content">
|
2906
|
+
<div class="paragraph"><p>The <a href="#PassengerMaxRequestTime">passenger_max_request_time</a> directive should be
|
2907
|
+
considered as a workaround for misbehaving applications. It is advised that you
|
2908
|
+
fix the problem in your application rather than relying on these directives as a
|
2909
|
+
measure to avoid freezing applications.</p></div>
|
2910
|
+
</td>
|
2911
|
+
</tr></table>
|
2912
|
+
</div>
|
2913
|
+
</div>
|
2914
|
+
<div class="sect3">
|
2915
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerMemoryLimit" data-comment-topic="passenger-memory-limit-integer--1ry7dwx">5.9.8. passenger_memory_limit <integer></h4>
|
2916
|
+
<div class="paragraph"><p>The maximum amount of memory that an application process may use, in megabytes.
|
2917
|
+
Once an application process has surpassed its memory limit, it will process
|
2918
|
+
all the requests currently present in its queue and then shut down.
|
2919
|
+
A value of 0 means that there is no maximum: the application’s memory usage
|
2920
|
+
will not be checked.</p></div>
|
2921
|
+
<div class="paragraph"><p>This option is useful if your application is leaking memory. By shutting
|
2922
|
+
it down, all of its memory is guaranteed to be freed by the operating system.</p></div>
|
2923
|
+
<div class="paragraph"><p>This option may occur in the following places:</p></div>
|
2924
|
+
<div class="ulist"><ul>
|
2925
|
+
<li>
|
2926
|
+
<p>
|
2927
|
+
In the <em>http</em> configuration block.
|
2928
|
+
</p>
|
2929
|
+
</li>
|
2930
|
+
<li>
|
2931
|
+
<p>
|
2932
|
+
In a <em>server</em> configuration block.
|
2933
|
+
</p>
|
2934
|
+
</li>
|
2935
|
+
<li>
|
2936
|
+
<p>
|
2937
|
+
In a <em>location</em> configuration block.
|
2938
|
+
</p>
|
2939
|
+
</li>
|
2940
|
+
<li>
|
2941
|
+
<p>
|
2942
|
+
In an <em>if</em> configuration scope.
|
2943
|
+
</p>
|
2944
|
+
</li>
|
2945
|
+
</ul></div>
|
2946
|
+
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>200</em>.</p></div>
|
2947
|
+
<div class="admonitionblock">
|
2948
|
+
<table><tr>
|
2949
|
+
<td class="icon">
|
2950
|
+
<img src="./images/icons/note.png" alt="Note">
|
2951
|
+
</td>
|
2952
|
+
<td class="content">
|
2953
|
+
<div class="title">A word about permissions</div>
|
2954
|
+
<div class="paragraph"><p>The <a href="#PassengerMemoryLimit">passenger_memory_limit</a> directive requires that the
|
2955
|
+
user that the application is running as (see <a href="#PassengerUserSwitching">passenger_user_switching</a>)
|
2956
|
+
to have access to the <span class="monospaced">/proc</span> file system, or to be able to inspect its status
|
2957
|
+
with <span class="monospaced">ps</span> (which on Linux and FreeBSD systems basically means the same thing, since <span class="monospaced">ps</span>
|
2958
|
+
reads process information from <span class="monospaced">/proc</span>). Therefore, on servers running with
|
2959
|
+
tight permissions on <span class="monospaced">/proc</span>, this directive may not work. If you wish to use
|
2960
|
+
this directive and your <span class="monospaced">/proc</span> permissions are too tight, then please consider
|
2961
|
+
untightening the permissions.</p></div>
|
2962
|
+
</td>
|
2963
|
+
</tr></table>
|
2964
|
+
</div>
|
2965
|
+
<div class="admonitionblock">
|
2966
|
+
<table><tr>
|
2967
|
+
<td class="icon">
|
2968
|
+
<img src="./images/icons/tip.png" alt="Tip">
|
2969
|
+
</td>
|
2970
|
+
<td class="content">
|
2971
|
+
<div class="title">FreeBSD and <span class="monospaced">/proc</span>
|
2972
|
+
</div>
|
2973
|
+
<div class="paragraph"><p>On many FreeBSD systems, <span class="monospaced">/proc</span> is not mounted by default. <span class="monospaced">/proc</span> <strong>must</strong> be
|
2974
|
+
mounted in order for <a href="#PassengerMemoryLimit">passenger_memory_limit</a> to work.</p></div>
|
2975
|
+
<div class="paragraph"><p>It is also advised that you mount <span class="monospaced">/proc</span> with the <span class="monospaced">linprocfs</span> filesystem type
|
2976
|
+
instead of the regular FreeBSD <span class="monospaced">proc</span> filesystem type. The <span class="monospaced">linprocfs</span> filesystem
|
2977
|
+
type allows Phusion Passenger to read memory information from <span class="monospaced">/proc</span> directly,
|
2978
|
+
which is very fast. If you mount <span class="monospaced">/proc</span> with a different filesystem type, then
|
2979
|
+
Phusion Passenger must resort to querying memory information from the <span class="monospaced">ps</span> command,
|
2980
|
+
which is a lot slower.</p></div>
|
2981
|
+
</td>
|
2982
|
+
</tr></table>
|
2983
|
+
</div>
|
2984
|
+
<div class="admonitionblock">
|
2985
|
+
<table><tr>
|
2986
|
+
<td class="icon">
|
2987
|
+
<img src="./images/icons/caution.png" alt="Caution">
|
2988
|
+
</td>
|
2989
|
+
<td class="content">
|
2990
|
+
<div class="paragraph"><p>The <a href="#PassengerMaxRequests">passenger_max_requests</a> and
|
2991
|
+
<a href="#PassengerMemoryLimit">passenger_memory_limit</a> directives should be considered
|
2992
|
+
as workarounds for misbehaving applications. It is advised that you fix the
|
2993
|
+
problem in your application rather than relying on these directives as a
|
2994
|
+
measure to avoid memory leaks.</p></div>
|
2995
|
+
</td>
|
2996
|
+
</tr></table>
|
2997
|
+
</div>
|
2998
|
+
</div>
|
2999
|
+
<div class="sect3">
|
3000
|
+
<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--1f2phk7">5.9.9. passenger_pre_start <url></h4>
|
2671
3001
|
<div class="paragraph"><p>By default, Phusion Passenger does not start any application processes until said
|
2672
3002
|
web application is first accessed. The result is that the first visitor of said
|
2673
3003
|
web application might experience a small delay as Phusion Passenger is starting
|
@@ -2882,9 +3212,9 @@ the request ending up at a different web server in the cluster.</p></div>
|
|
2882
3212
|
</div>
|
2883
3213
|
</div>
|
2884
3214
|
<div class="sect2">
|
2885
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_logging_and_debugging_options" data-comment-topic="logging-and-debugging-options-14e91ni">5.
|
3215
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_logging_and_debugging_options" data-comment-topic="logging-and-debugging-options-14e91ni">5.10. Logging and debugging options</h3>
|
2886
3216
|
<div class="sect3">
|
2887
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_log_level_lt_integer_gt" data-comment-topic="passenger-log-level-integer--17snhon">5.
|
3217
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_log_level_lt_integer_gt" data-comment-topic="passenger-log-level-integer--17snhon">5.10.1. passenger_log_level <integer></h4>
|
2888
3218
|
<div class="paragraph"><p>This option allows one to specify how much information Phusion Passenger should
|
2889
3219
|
write to the Nginx error log file. A higher log level value means that more
|
2890
3220
|
information will be logged.</p></div>
|
@@ -2917,17 +3247,56 @@ information will be logged.</p></div>
|
|
2917
3247
|
The default is <em>0</em>.</p></div>
|
2918
3248
|
</div>
|
2919
3249
|
<div class="sect3">
|
2920
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_debug_log_file_lt_filename_gt" data-comment-topic="passenger-debug-log-file-filename--21ubaj">5.
|
3250
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_debug_log_file_lt_filename_gt" data-comment-topic="passenger-debug-log-file-filename--21ubaj">5.10.2. passenger_debug_log_file <filename></h4>
|
2921
3251
|
<div class="paragraph"><p>By default Phusion Passenger debugging and error messages are written to the global
|
2922
3252
|
web server error log. This option allows one to specify the file that debugging and
|
2923
3253
|
error messages should be written to instead.</p></div>
|
2924
3254
|
<div class="paragraph"><p>This option may only occur once, in the <em>http</em> configuration block.</p></div>
|
2925
3255
|
</div>
|
3256
|
+
<div class="sect3">
|
3257
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passenger_debugger_lt_on_off_gt" data-comment-topic="passenger-debugger-on-off--1wkuq85">5.10.3. passenger_debugger <on|off></h4>
|
3258
|
+
<div class="paragraph"><p><strong>Available in Phusion Passenger Enterprise since version 3.0.0.</strong></p></div>
|
3259
|
+
<div class="paragraph"><p>Turns support for application debugging on or off. In case of Ruby applications,
|
3260
|
+
turning this option on will cause them to load the <span class="monospaced">ruby-debug</span> gem (when on Ruby 1.8)
|
3261
|
+
or the <span class="monospaced">debugger</span> gem (when on Ruby 1.9). If you’re using Bundler, you should add
|
3262
|
+
this to your Gemfile:</p></div>
|
3263
|
+
<div class="listingblock">
|
3264
|
+
<div class="content monospaced">
|
3265
|
+
<pre>gem 'ruby-debug', :platforms => :ruby_18
|
3266
|
+
gem 'debugger', :platforms => :ruby_19</pre>
|
3267
|
+
</div>
|
3268
|
+
</div>
|
3269
|
+
<div class="paragraph"><p>Once debugging is turned on, you can use the command <span class="monospaced">passenger-irb --debug <PID></span> to attach an rdebug console to the application process with the given PID. Attaching will succeed once the application process executes a <span class="monospaced">debugger</span> command.</p></div>
|
3270
|
+
<div class="paragraph"><p>This option may occur in the following places:</p></div>
|
3271
|
+
<div class="ulist"><ul>
|
3272
|
+
<li>
|
3273
|
+
<p>
|
3274
|
+
In the <em>http</em> configuration block.
|
3275
|
+
</p>
|
3276
|
+
</li>
|
3277
|
+
<li>
|
3278
|
+
<p>
|
3279
|
+
In a <em>server</em> configuration block.
|
3280
|
+
</p>
|
3281
|
+
</li>
|
3282
|
+
<li>
|
3283
|
+
<p>
|
3284
|
+
In a <em>location</em> configuration block.
|
3285
|
+
</p>
|
3286
|
+
</li>
|
3287
|
+
<li>
|
3288
|
+
<p>
|
3289
|
+
In an <em>if</em> configuration scope.
|
3290
|
+
</p>
|
3291
|
+
</li>
|
3292
|
+
</ul></div>
|
3293
|
+
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>off</em>.</p></div>
|
3294
|
+
</div>
|
2926
3295
|
</div>
|
2927
3296
|
<div class="sect2">
|
2928
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_ruby_on_rails_specific_options" data-comment-topic="ruby-on-rails-specific-options-12vfokt">5.
|
3297
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_ruby_on_rails_specific_options" data-comment-topic="ruby-on-rails-specific-options-12vfokt">5.11. Ruby on Rails-specific options</h3>
|
2929
3298
|
<div class="sect3">
|
2930
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="RailsEnv" data-comment-topic="rails-env-string--jlh7v9">5.
|
3299
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="RailsEnv" data-comment-topic="rails-env-string--jlh7v9">5.11.1. rails_env <string></h4>
|
2931
3300
|
<div class="paragraph"><p>This option allows one to specify the default <span class="monospaced">RAILS_ENV</span> value.</p></div>
|
2932
3301
|
<div class="paragraph"><p>This option may occur in the following places:</p></div>
|
2933
3302
|
<div class="ulist"><ul>
|
@@ -2955,7 +3324,7 @@ In an <em>if</em> configuration scope.
|
|
2955
3324
|
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>production</em>.</p></div>
|
2956
3325
|
</div>
|
2957
3326
|
<div class="sect3">
|
2958
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_rails_framework_spawner_idle_time_lt_integer_gt" data-comment-topic="rails-framework-spawner-idle-time-integer--q5ljd5">5.
|
3327
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_rails_framework_spawner_idle_time_lt_integer_gt" data-comment-topic="rails-framework-spawner-idle-time-integer--q5ljd5">5.11.2. rails_framework_spawner_idle_time <integer></h4>
|
2959
3328
|
<div class="paragraph"><p>The FrameworkSpawner server (explained in <a href="#spawning_methods_explained">Spawning methods explained</a>) has an idle timeout, just like the backend processes spawned by
|
2960
3329
|
Phusion Passenger do. That is, it will automatically shutdown if it hasn’t done
|
2961
3330
|
anything for a given period.</p></div>
|
@@ -2994,7 +3363,7 @@ In an <em>if</em> configuration scope.
|
|
2994
3363
|
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>1800</em> (30 minutes).</p></div>
|
2995
3364
|
</div>
|
2996
3365
|
<div class="sect3">
|
2997
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_rails_app_spawner_idle_time_lt_integer_gt" data-comment-topic="rails-app-spawner-idle-time-integer--1xjqe4b">5.
|
3366
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_rails_app_spawner_idle_time_lt_integer_gt" data-comment-topic="rails-app-spawner-idle-time-integer--1xjqe4b">5.11.3. rails_app_spawner_idle_time <integer></h4>
|
2998
3367
|
<div class="paragraph"><p>The ApplicationSpawner server (explained in <a href="#spawning_methods_explained">Spawning methods explained</a>) has an idle timeout, just like the backend processes spawned by
|
2999
3368
|
Phusion Passenger do. That is, it will automatically shutdown if it hasn’t done
|
3000
3369
|
anything for a given period.</p></div>
|
@@ -3034,9 +3403,9 @@ In an <em>if</em> configuration scope.
|
|
3034
3403
|
</div>
|
3035
3404
|
</div>
|
3036
3405
|
<div class="sect2">
|
3037
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_rack_specific_options" data-comment-topic="rack-specific-options-13yvdxs">5.
|
3406
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_rack_specific_options" data-comment-topic="rack-specific-options-13yvdxs">5.12. Rack-specific options</h3>
|
3038
3407
|
<div class="sect3">
|
3039
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="RackEnv" data-comment-topic="rack-env-string--tqmrt0">5.
|
3408
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="RackEnv" data-comment-topic="rack-env-string--tqmrt0">5.12.1. rack_env <string></h4>
|
3040
3409
|
<div class="paragraph"><p>This option allows one to specify the default <span class="monospaced">RACK_ENV</span> value.</p></div>
|
3041
3410
|
<div class="paragraph"><p>This option may occur in the following places:</p></div>
|
3042
3411
|
<div class="ulist"><ul>
|
@@ -3065,11 +3434,11 @@ In an <em>if</em> configuration scope.
|
|
3065
3434
|
</div>
|
3066
3435
|
</div>
|
3067
3436
|
<div class="sect2">
|
3068
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_deprecated_options" data-comment-topic="deprecated-options-1dtzo0g">5.
|
3437
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_deprecated_options" data-comment-topic="deprecated-options-1dtzo0g">5.13. Deprecated options</h3>
|
3069
3438
|
<div class="paragraph"><p>The following options have been deprecated, but are still supported for backwards
|
3070
3439
|
compatibility reasons.</p></div>
|
3071
3440
|
<div class="sect3">
|
3072
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_rails_spawn_method" data-comment-topic="rails-spawn-method-17vdnpt">5.
|
3441
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_rails_spawn_method" data-comment-topic="rails-spawn-method-17vdnpt">5.13.1. rails_spawn_method</h4>
|
3073
3442
|
<div class="paragraph"><p>Deprecated in favor of <a href="#PassengerSpawnMethod">passenger_spawn_method</a>.</p></div>
|
3074
3443
|
</div>
|
3075
3444
|
</div>
|
@@ -3353,6 +3722,11 @@ through the <em>X-Passenger-Connect-Password</em> HTTP header, like this:</p></d
|
|
3353
3722
|
</div>
|
3354
3723
|
</div>
|
3355
3724
|
</div>
|
3725
|
+
<div class="sect2">
|
3726
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_attaching_an_irb_console_to_an_application_process" data-comment-topic="attaching-an-irb-console-to-an-application-process-d36enw">6.5. Attaching an IRB console to an application process</h3>
|
3727
|
+
<div class="paragraph"><p><strong>Available in Phusion Passenger Enterprise since version 3.0.0.</strong></p></div>
|
3728
|
+
<div class="paragraph"><p>You can attach an IRB console to any application process and inspect its state by executing arbitrary Ruby code. Do this by invoking <span class="monospaced">passenger-irb <PID></span> where <em><PID></em> is the PID of the application process you wish to inspect. Note that the IRB console is currently only available for Ruby apps, not for apps in any other languages.</p></div>
|
3729
|
+
</div>
|
3356
3730
|
</div>
|
3357
3731
|
</div>
|
3358
3732
|
<div class="sect1">
|
@@ -4099,7 +4473,7 @@ has no effect.</p></div>
|
|
4099
4473
|
<div id="footnotes"><hr></div>
|
4100
4474
|
<div id="footer">
|
4101
4475
|
<div id="footer-text">
|
4102
|
-
Last updated 2012-
|
4476
|
+
Last updated 2012-08-01 13:31:01 CEST
|
4103
4477
|
</div>
|
4104
4478
|
</div>
|
4105
4479
|
<script>/*! jQuery v1.7.1 jquery.com | jquery.org/license */
|