From 14e3ead06e10dc374d84b93bcde419edb82847ed Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Thu, 21 Feb 2013 12:56:04 +0100 Subject: [PATCH] Add redis.max configuration setting and document it. --- config/environments/development.js.example | 8 ++++++++ config/environments/production.js.example | 8 ++++++++ config/environments/staging.js.example | 12 +++++++++++- config/environments/test.js.example | 12 ++++++++++-- 4 files changed, 37 insertions(+), 3 deletions(-) diff --git a/config/environments/development.js.example b/config/environments/development.js.example index 2f65ab4d..1d97b1dd 100644 --- a/config/environments/development.js.example +++ b/config/environments/development.js.example @@ -35,6 +35,14 @@ var config = { ,redis: { host: '127.0.0.1', port: 6379, + // Max number of connections in each pool. + // Users will be put on a queue when the limit is hit. + // Set to maxConnection to have no possible queues. + // There are currently 3 pools involved in serving + // windshaft-cartodb requests so multiply this number + // by 3 to know how many possible connections will be + // kept open by the server. The default is 50. + max: 50, idleTimeoutMillis: 1, // idle time before dropping connection reapIntervalMillis: 1 // time between cleanups } diff --git a/config/environments/production.js.example b/config/environments/production.js.example index 9a336133..42a9dd3e 100644 --- a/config/environments/production.js.example +++ b/config/environments/production.js.example @@ -29,6 +29,14 @@ var config = { ,redis: { host: '127.0.0.1', port: 6379, + // Max number of connections in each pool. + // Users will be put on a queue when the limit is hit. + // Set to maxConnection to have no possible queues. + // There are currently 3 pools involved in serving + // windshaft-cartodb requests so multiply this number + // by 3 to know how many possible connections will be + // kept open by the server. The default is 50. + max: 50, idleTimeoutMillis: 30000, // idle time before dropping connection reapIntervalMillis: 1000 // time between cleanups } diff --git a/config/environments/staging.js.example b/config/environments/staging.js.example index c691468f..cd89f527 100644 --- a/config/environments/staging.js.example +++ b/config/environments/staging.js.example @@ -28,7 +28,17 @@ var config = { } ,redis: { host: '127.0.0.1', - port: 6379 + port: 6379, + // Max number of connections in each pool. + // Users will be put on a queue when the limit is hit. + // Set to maxConnection to have no possible queues. + // There are currently 3 pools involved in serving + // windshaft-cartodb requests so multiply this number + // by 3 to know how many possible connections will be + // kept open by the server. The default is 50. + max: 50, + idleTimeoutMillis: 30000, // idle time before dropping connection + reapIntervalMillis: 1000 // time between cleanups } ,sqlapi: { protocol: 'https', diff --git a/config/environments/test.js.example b/config/environments/test.js.example index a9db586f..e7221704 100644 --- a/config/environments/test.js.example +++ b/config/environments/test.js.example @@ -29,8 +29,16 @@ var config = { ,redis: { host: '127.0.0.1', port: 6333, - idleTimeoutMillis: 1, - reapIntervalMillis: 1 + // Max number of connections in each pool. + // Users will be put on a queue when the limit is hit. + // Set to maxConnection to have no possible queues. + // There are currently 3 pools involved in serving + // windshaft-cartodb requests so multiply this number + // by 3 to know how many possible connections will be + // kept open by the server. The default is 50. + max: 50, + idleTimeoutMillis: 1, // idle time before dropping connection + reapIntervalMillis: 1 // time between cleanups } ,sqlapi: { protocol: 'http',