0
@@ -68,6 +68,8 @@ passenger_config_create_dir(apr_pool_t *p, char *dirspec) {
0
config->spawnMethod = DirConfig::SM_UNSET;
0
config->frameworkSpawnerTimeout = -1;
0
config->appSpawnerTimeout = -1;
0
+ config->maxRequests = 0;
0
+ config->maxRequestsSpecified = false;
0
@@ -97,6 +99,7 @@ passenger_config_merge_dir(apr_pool_t *p, void *basev, void *addv) {
0
config->spawnMethod = (add->spawnMethod == DirConfig::SM_UNSET) ? base->spawnMethod : add->spawnMethod;
0
config->frameworkSpawnerTimeout = (add->frameworkSpawnerTimeout == -1) ? base->frameworkSpawnerTimeout : add->frameworkSpawnerTimeout;
0
config->appSpawnerTimeout = (add->appSpawnerTimeout == -1) ? base->appSpawnerTimeout : add->appSpawnerTimeout;
0
+ config->maxRequests = (!add->maxRequestsSpecified) ? base->maxRequests : add->maxRequests;
0
@@ -277,6 +280,24 @@ cmd_passenger_default_user(cmd_parms *cmd, void *dummy, const char *arg) {
0
+cmd_passenger_max_requests(cmd_parms *cmd, void *pcfg, const char *arg) {
0
+ DirConfig *config = (DirConfig *) pcfg;
0
+ result = strtol(arg, &end, 10);
0
+ return "Invalid number specified for PassengerMaxRequests.";
0
+ } else if (result < 0) {
0
+ return "Value for PassengerMaxRequests must be greater than or equal to 0.";
0
+ config->maxRequests = (unsigned long) result;
0
+ config->maxRequestsSpecified = true;
0
cmd_passenger_disable(cmd_parms *cmd, void *pcfg) {
0
DirConfig *config = (DirConfig *) pcfg;
0
config->enabled = DirConfig::DISABLED;
0
@@ -462,7 +483,12 @@ const command_rec passenger_commands[] = {
0
"The user that Rails/Rack applications must run as when user switching fails or is disabled."),
0
- AP_INIT_NO_ARGS("PassengerDisable",
0
+ AP_INIT_TAKE1("PassengerMaxRequests", // TODO: document this
0
+ (Take1Func) cmd_passenger_max_requests,
0
+ "The user that Rails/Rack applications must run as when user switching fails or is disabled."),
0
+ AP_INIT_NO_ARGS("PassengerDisable", // TODO: document this
0
(Take0Func) cmd_passenger_disable,
0
@@ -494,12 +520,12 @@ const command_rec passenger_commands[] = {
0
"The spawn method to use."),
0
- AP_INIT_TAKE1("RailsFrameworkSpawnerIdleTime",
0
+ AP_INIT_TAKE1("RailsFrameworkSpawnerIdleTime",
// TODO: document this0
(Take1Func) cmd_rails_framework_spawner_idle_time,
0
"The maximum number of seconds that an application spawner may be idle before it is shutdown."),
0
- AP_INIT_TAKE1("RailsAppSpawnerIdleTime",
0
+ AP_INIT_TAKE1("RailsAppSpawnerIdleTime",
// TODO: document this0
(Take1Func) cmd_rails_app_spawner_idle_time,
Comments
No one has commented yet.