From 24cbd192aac44ac18a5cd8907085a35ae28e4b27 Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Wed, 24 Sep 2014 11:42:36 +0200 Subject: [PATCH 1/7] Share one redis-mpool across the application --- NEWS.md | 1 + app.js | 15 +++++++++++---- lib/cartodb/cartodb_windshaft.js | 9 +++++---- lib/cartodb/server_options.js | 12 +++++++----- package.json | 2 +- 5 files changed, 25 insertions(+), 14 deletions(-) diff --git a/NEWS.md b/NEWS.md index 5cefa031..79a398c0 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,7 @@ -------------------- Enhancements: + - Share one redis-mpool across the application - Upgrades windshaft and cartodb-redis - Supports `!scale_denominator!` dynamic param in SQL queries - Metrics revamp: removes and adds some metrics diff --git a/app.js b/app.js index c420ab61..de77d794 100755 --- a/app.js +++ b/app.js @@ -8,7 +8,8 @@ */ var path = require('path'), - fs = require('fs') + fs = require('fs'), + RedisPool = require('redis-mpool') ; @@ -31,7 +32,7 @@ var _ = require('underscore'); global.environment = require(__dirname + '/config/environments/' + ENV); global.environment.api_hostname = require('os').hostname().split('.')[0]; -global.log4js = require('log4js') +global.log4js = require('log4js'); log4js_config = { appenders: [], replaceConsole:true @@ -65,10 +66,16 @@ if ( global.environment.rollbar ) { log4js.configure(log4js_config, { cwd: __dirname }); global.logger = log4js.getLogger(); +var redisOpts = _.extend(global.environment.redis, { + name: 'windshaft_cartodb', + reportInterval: 5000 + }), + redisPool = new RedisPool(redisOpts); + // Include cartodb_windshaft only _after_ the "global" variable is set // See https://github.com/Vizzuality/Windshaft-cartodb/issues/28 -var CartodbWindshaft = require('./lib/cartodb/cartodb_windshaft'); -var serverOptions = require('./lib/cartodb/server_options')(); +var CartodbWindshaft = require('./lib/cartodb/cartodb_windshaft'), + serverOptions = require('./lib/cartodb/server_options')(redisPool); ws = CartodbWindshaft(serverOptions); diff --git a/lib/cartodb/cartodb_windshaft.js b/lib/cartodb/cartodb_windshaft.js index cb6db192..c474afc1 100644 --- a/lib/cartodb/cartodb_windshaft.js +++ b/lib/cartodb/cartodb_windshaft.js @@ -1,10 +1,6 @@ - var _ = require('underscore') , Step = require('step') , Windshaft = require('windshaft') - , redisPool = require('redis-mpool')(_.extend(global.environment.redis, {name: 'windshaft:cartodb'})) - // TODO: instanciate cartoData with redisPool - , cartoData = require('cartodb-redis')(global.environment.redis) , SignedMaps = require('./signed_maps.js') , TemplateMaps = require('./template_maps.js') , Cache = require('./cache_validator') @@ -26,6 +22,11 @@ var CartodbWindshaft = function(serverOptions) { } } + var redisPool = serverOptions.redis.pool + || require('redis-mpool')(_.extend(global.environment.redis, {name: 'windshaft:cartodb'})); + + var cartoData = require('cartodb-redis')({pool: redisPool}); + if(serverOptions.cache_enabled) { console.log("cache invalidation enabled, varnish on ", serverOptions.varnish_host, ' ', serverOptions.varnish_port); Cache.init(serverOptions.varnish_host, serverOptions.varnish_port, serverOptions.varnish_secret); diff --git a/lib/cartodb/server_options.js b/lib/cartodb/server_options.js index 2fa27c8c..a42152ad 100644 --- a/lib/cartodb/server_options.js +++ b/lib/cartodb/server_options.js @@ -1,6 +1,5 @@ var _ = require('underscore') , Step = require('step') - , cartoData = require('cartodb-redis')(global.environment.redis) , Cache = require('./cache_validator') , QueryTablesApi = require('./api/query_tables_api') , crypto = require('crypto') @@ -16,11 +15,11 @@ if ( _.isUndefined(global.environment.sqlapi.domain) ) { } } -module.exports = function(){ +module.exports = function(redisPool) { - var lzmaWorker = new LZMA(); - - var queryTablesApi = new QueryTablesApi(); + var cartoData = require('cartodb-redis')({pool: redisPool}), + lzmaWorker = new LZMA(), + queryTablesApi = new QueryTablesApi(); var rendererConfig = _.defaults(global.environment.renderer || {}, { cache_ttl: 60000, // milliseconds @@ -77,6 +76,9 @@ module.exports = function(){ // See http://github.com/CartoDB/Windshaft-cartodb/issues/161 me.redis.unwatchOnRelease = false; + // Re-use redisPool + me.redis.pool = redisPool; + /* This whole block is about generating X-Cache-Channel { */ // TODO: review lifetime of elements of this cache diff --git a/package.json b/package.json index 99627479..78425b33 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "request": "~2.9.203", "cartodb-redis": "https://github.com/CartoDB/node-cartodb-redis/tarball/0.11.0", "cartodb-psql": "https://github.com/CartoDB/node-cartodb-psql/tarball/0.4.0", - "redis-mpool": "https://github.com/CartoDB/node-redis-mpool/tarball/0.1.0", + "redis-mpool": "https://github.com/CartoDB/node-redis-mpool/tarball/master", "lzma": "~1.3.7", "log4js": "~0.6.17", "rollbar": "~0.3.13" From 7009eb20f83e1202ade0eae51cc049fbaa469c69 Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Wed, 24 Sep 2014 11:42:53 +0200 Subject: [PATCH 2/7] Check style fixes --- lib/cartodb/cartodb_windshaft.js | 14 +++++++------- lib/cartodb/server_options.js | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/cartodb/cartodb_windshaft.js b/lib/cartodb/cartodb_windshaft.js index c474afc1..216d8682 100644 --- a/lib/cartodb/cartodb_windshaft.js +++ b/lib/cartodb/cartodb_windshaft.js @@ -42,7 +42,7 @@ var CartodbWindshaft = function(serverOptions) { err = new Error("map state cannot be changed by unauthenticated request!"); } callback(err, req); - } + }; // This is for Templated maps // @@ -53,7 +53,7 @@ var CartodbWindshaft = function(serverOptions) { serverOptions.signedMaps = new SignedMaps(redisPool); var templateMapsOpts = { max_user_templates: global.environment.maxUserTemplates - } + }; var templateMaps = new TemplateMaps(redisPool, serverOptions.signedMaps, templateMapsOpts); // boot @@ -65,7 +65,7 @@ var CartodbWindshaft = function(serverOptions) { var version = wsversion(); version.windshaft_cartodb = require('../../package.json').version; return version; - } + }; var ws_sendResponse = ws.sendResponse; // GET routes for which we don't want to request any caching. @@ -203,7 +203,7 @@ var CartodbWindshaft = function(serverOptions) { ws.userByReq = function(req) { return serverOptions.userByReq(req); - } + }; // Add a template ws.post(template_baseurl, function(req, res) { @@ -446,7 +446,7 @@ var CartodbWindshaft = function(serverOptions) { function prepareResponse(err, tpl_ids){ if ( err ) throw err; // NOTE: might omit "cbduser" if == dbowner ... - var ids = _.map(tpl_ids, function(id) { return cdbuser + '@' + id; }) + var ids = _.map(tpl_ids, function(id) { return cdbuser + '@' + id; }); return { template_ids: ids }; }, function finish(err, response){ @@ -501,7 +501,7 @@ var CartodbWindshaft = function(serverOptions) { if ( tpl_id[0] && tpl_id[0] != cdbuser ) { var err = new Error('Cannot instanciate map of user "' + tpl_id[0] + '" on database of user "' - + cdbuser + '"') + + cdbuser + '"'); err.http_status = 403; callback(err); return; @@ -666,6 +666,6 @@ var CartodbWindshaft = function(serverOptions) { // ---- Template maps interface ends @} return ws; -} +}; module.exports = CartodbWindshaft; diff --git a/lib/cartodb/server_options.js b/lib/cartodb/server_options.js index a42152ad..df6f865b 100644 --- a/lib/cartodb/server_options.js +++ b/lib/cartodb/server_options.js @@ -3,7 +3,7 @@ var _ = require('underscore') , Cache = require('./cache_validator') , QueryTablesApi = require('./api/query_tables_api') , crypto = require('crypto') - , LZMA = require('lzma').LZMA; + , LZMA = require('lzma').LZMA ; // This is for backward compatibility with 1.3.3 From 9f5faf7cf879905042f65a0c895ac6197a76a9bc Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Tue, 14 Oct 2014 21:19:44 +0200 Subject: [PATCH 3/7] Server options to instantiate cartodb-redis with redis configuration if pool is not provided --- NEWS.md | 4 +++- lib/cartodb/server_options.js | 4 ++-- npm-shrinkwrap.json | 20 +++++++++++--------- package.json | 2 +- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/NEWS.md b/NEWS.md index 3e3d48ac..d4448129 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,9 @@ 1.19.1 -- 2014-mm-dd -------------------- +Enhancements: + - Share one redis-mpool across the application + 1.19.0 -- 2014-10-14 -------------------- @@ -61,7 +64,6 @@ New features: - Starts using mapnik 2.3.x Enhancements: - - Share one redis-mpool across the application - Upgrades windshaft and cartodb-redis - Supports `!scale_denominator!` dynamic param in SQL queries - Metrics revamp: removes and adds some metrics diff --git a/lib/cartodb/server_options.js b/lib/cartodb/server_options.js index df6f865b..c8c9dbcc 100644 --- a/lib/cartodb/server_options.js +++ b/lib/cartodb/server_options.js @@ -16,8 +16,8 @@ if ( _.isUndefined(global.environment.sqlapi.domain) ) { } module.exports = function(redisPool) { - - var cartoData = require('cartodb-redis')({pool: redisPool}), + var redisOpts = redisPool ? {pool: redisPool} : global.environment.redis; + var cartoData = require('cartodb-redis')(redisOpts), lzmaWorker = new LZMA(), queryTablesApi = new QueryTablesApi(); diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index e72b9e40..94fb8c60 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -70,7 +70,8 @@ "dependencies": { "async": { "version": "0.2.10", - "from": "async@~0.2.0" + "from": "async@~0.2.0", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz" }, "readable-stream": { "version": "1.0.33-1", @@ -90,7 +91,7 @@ }, "inherits": { "version": "2.0.1", - "from": "inherits@2" + "from": "inherits@~2.0.1" } } } @@ -106,9 +107,9 @@ "resolved": "https://github.com/Vizzuality/node-varnish/tarball/0.3.0" }, "redis-mpool": { - "version": "0.1.0", - "from": "https://github.com/CartoDB/node-redis-mpool/tarball/0.1.0", - "resolved": "https://github.com/CartoDB/node-redis-mpool/tarball/0.1.0", + "version": "0.2.0", + "from": "https://github.com/CartoDB/node-redis-mpool/tarball/master", + "resolved": "https://github.com/CartoDB/node-redis-mpool/tarball/master", "dependencies": { "generic-pool": { "version": "2.1.1", @@ -162,12 +163,13 @@ }, "underscore": { "version": "1.6.0", - "from": "underscore@~1.6.0" + "from": "underscore@~1.6.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz" }, "windshaft": { - "version": "0.28.2", - "from": "https://github.com/CartoDB/Windshaft/tarball/0.28.2", - "resolved": "https://github.com/CartoDB/Windshaft/tarball/0.28.2", + "version": "0.28.3", + "from": "https://github.com/CartoDB/Windshaft/tarball/master", + "resolved": "https://github.com/CartoDB/Windshaft/tarball/master", "dependencies": { "chronograph": { "version": "0.1.0", diff --git a/package.json b/package.json index 215d68de..c7222d2e 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "node-varnish": "https://github.com/Vizzuality/node-varnish/tarball/0.3.0", "underscore" : "~1.6.0", "dot": "~1.0.2", - "windshaft": "https://github.com/CartoDB/Windshaft/tarball/0.28.2", + "windshaft": "https://github.com/CartoDB/Windshaft/tarball/master", "step": "~0.0.5", "request": "~2.9.203", "cartodb-redis": "https://github.com/CartoDB/node-cartodb-redis/tarball/0.11.0", From 804088009eeb45c2b5838a75299ec08e2d22ddf4 Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Tue, 14 Oct 2014 22:12:35 +0200 Subject: [PATCH 4/7] Report to statsd the status of redis pools --- NEWS.md | 3 +++ app.js | 14 ++++++++++---- config/environments/development.js.example | 3 +++ config/environments/production.js.example | 3 +++ config/environments/staging.js.example | 3 +++ config/environments/test.js.example | 3 +++ 6 files changed, 25 insertions(+), 4 deletions(-) diff --git a/NEWS.md b/NEWS.md index d4448129..439acd10 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,9 @@ 1.19.1 -- 2014-mm-dd -------------------- +New features: + - Report to statsd the status of redis pools + Enhancements: - Share one redis-mpool across the application diff --git a/app.js b/app.js index a3d27f97..e8d5ea44 100755 --- a/app.js +++ b/app.js @@ -70,10 +70,7 @@ if ( global.environment.rollbar ) { log4js.configure(log4js_config, { cwd: __dirname }); global.logger = log4js.getLogger(); -var redisOpts = _.extend(global.environment.redis, { - name: 'windshaft_cartodb', - reportInterval: 5000 - }), +var redisOpts = _.extend(global.environment.redis, { name: 'windshaft' }), redisPool = new RedisPool(redisOpts); // Include cartodb_windshaft only _after_ the "global" variable is set @@ -83,6 +80,15 @@ var CartodbWindshaft = require('./lib/cartodb/cartodb_windshaft'), ws = CartodbWindshaft(serverOptions); +if (global.statsClient) { + redisPool.on('status', function(status) { + var keyPrefix = status.name + '.db' + status.db + '.'; + global.statsClient.gauge(keyPrefix + 'count', status.count); + global.statsClient.gauge(keyPrefix + 'unused', status.unused); + global.statsClient.gauge(keyPrefix + 'waiting', status.waiting); + }); +} + // Maximum number of connections for one process // 128 is a good number if you have up to 1024 filedescriptors // 4 is good if you have max 32 filedescriptors diff --git a/config/environments/development.js.example b/config/environments/development.js.example index d0ec046b..0205603c 100644 --- a/config/environments/development.js.example +++ b/config/environments/development.js.example @@ -108,6 +108,9 @@ var config = { slowPool: { log: true, // whether a slow acquire must be logged or not elapsedThreshold: 25 // the threshold to determine an slow acquire must be reported or not + }, + emitter: { + statusInterval: 5000 } } ,sqlapi: { diff --git a/config/environments/production.js.example b/config/environments/production.js.example index 794f7dfc..0bd36d57 100644 --- a/config/environments/production.js.example +++ b/config/environments/production.js.example @@ -102,6 +102,9 @@ var config = { slowPool: { log: true, // whether a slow acquire must be logged or not elapsedThreshold: 25 // the threshold to determine an slow acquire must be reported or not + }, + emitter: { + statusInterval: 5000 } } ,sqlapi: { diff --git a/config/environments/staging.js.example b/config/environments/staging.js.example index c07d17cb..13651d1f 100644 --- a/config/environments/staging.js.example +++ b/config/environments/staging.js.example @@ -102,6 +102,9 @@ var config = { slowPool: { log: true, // whether a slow acquire must be logged or not elapsedThreshold: 25 // the threshold to determine an slow acquire must be reported or not + }, + emitter: { + statusInterval: 5000 } } ,sqlapi: { diff --git a/config/environments/test.js.example b/config/environments/test.js.example index f91e36a4..a016e0ac 100644 --- a/config/environments/test.js.example +++ b/config/environments/test.js.example @@ -102,6 +102,9 @@ var config = { slowPool: { log: true, // whether a slow acquire must be logged or not elapsedThreshold: 25 // the threshold to determine an slow acquire must be reported or not + }, + emitter: { + statusInterval: 5000 } } ,sqlapi: { From 94c61cb959b055c4881653d6a7dee09bc82a76e2 Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Wed, 15 Oct 2014 12:31:40 +0200 Subject: [PATCH 5/7] Update to release versions --- npm-shrinkwrap.json | 17 ++++++++++------- package.json | 4 ++-- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 94fb8c60..fc38898e 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -108,8 +108,8 @@ }, "redis-mpool": { "version": "0.2.0", - "from": "https://github.com/CartoDB/node-redis-mpool/tarball/master", - "resolved": "https://github.com/CartoDB/node-redis-mpool/tarball/master", + "from": "https://github.com/CartoDB/node-redis-mpool/tarball/0.2.0", + "resolved": "https://github.com/CartoDB/node-redis-mpool/tarball/0.2.0", "dependencies": { "generic-pool": { "version": "2.1.1", @@ -167,9 +167,9 @@ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz" }, "windshaft": { - "version": "0.28.3", - "from": "https://github.com/CartoDB/Windshaft/tarball/master", - "resolved": "https://github.com/CartoDB/Windshaft/tarball/master", + "version": "0.29.0", + "from": "https://github.com/CartoDB/Windshaft/tarball/0.29.0", + "resolved": "https://github.com/CartoDB/Windshaft/tarball/0.29.0", "dependencies": { "chronograph": { "version": "0.1.0", @@ -274,7 +274,8 @@ }, "async": { "version": "0.9.0", - "from": "async@~0.9.0" + "from": "async@~0.9.0", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.0.tgz" } } }, @@ -1464,6 +1465,7 @@ "express": { "version": "2.5.11", "from": "express@~2.5.11", + "resolved": "https://registry.npmjs.org/express/-/express-2.5.11.tgz", "dependencies": { "connect": { "version": "1.9.2", @@ -1471,7 +1473,8 @@ "dependencies": { "formidable": { "version": "1.0.15", - "from": "formidable@1.0.x" + "from": "formidable@1.0.x", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.0.15.tgz" } } }, diff --git a/package.json b/package.json index c7222d2e..6f77fcd6 100644 --- a/package.json +++ b/package.json @@ -25,12 +25,12 @@ "node-varnish": "https://github.com/Vizzuality/node-varnish/tarball/0.3.0", "underscore" : "~1.6.0", "dot": "~1.0.2", - "windshaft": "https://github.com/CartoDB/Windshaft/tarball/master", + "windshaft": "https://github.com/CartoDB/Windshaft/tarball/0.29.0", "step": "~0.0.5", "request": "~2.9.203", "cartodb-redis": "https://github.com/CartoDB/node-cartodb-redis/tarball/0.11.0", "cartodb-psql": "https://github.com/CartoDB/node-cartodb-psql/tarball/0.4.0", - "redis-mpool": "https://github.com/CartoDB/node-redis-mpool/tarball/master", + "redis-mpool": "https://github.com/CartoDB/node-redis-mpool/tarball/0.2.0", "lzma": "~1.3.7", "log4js": "~0.6.17", "rollbar": "~0.3.13" From ceb1bb7f5006410a01b1b8f5f8544fa6395b631b Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Wed, 15 Oct 2014 16:20:51 +0200 Subject: [PATCH 6/7] Document what emitter.statusInterval is. --- config/environments/development.js.example | 2 +- config/environments/production.js.example | 2 +- config/environments/staging.js.example | 2 +- config/environments/test.js.example | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/environments/development.js.example b/config/environments/development.js.example index e279f357..1102b6b2 100644 --- a/config/environments/development.js.example +++ b/config/environments/development.js.example @@ -114,7 +114,7 @@ var config = { elapsedThreshold: 25 // the threshold to determine an slow acquire must be reported or not }, emitter: { - statusInterval: 5000 + statusInterval: 5000 // the time in millisecond between each status report is emitted from the pool } } ,sqlapi: { diff --git a/config/environments/production.js.example b/config/environments/production.js.example index 2845cde8..49ece937 100644 --- a/config/environments/production.js.example +++ b/config/environments/production.js.example @@ -108,7 +108,7 @@ var config = { elapsedThreshold: 25 // the threshold to determine an slow acquire must be reported or not }, emitter: { - statusInterval: 5000 + statusInterval: 5000 // the time in millisecond between each status report is emitted from the pool } } ,sqlapi: { diff --git a/config/environments/staging.js.example b/config/environments/staging.js.example index 452adcf2..a20cbf98 100644 --- a/config/environments/staging.js.example +++ b/config/environments/staging.js.example @@ -108,7 +108,7 @@ var config = { elapsedThreshold: 25 // the threshold to determine an slow acquire must be reported or not }, emitter: { - statusInterval: 5000 + statusInterval: 5000 // the time in millisecond between each status report is emitted from the pool } } ,sqlapi: { diff --git a/config/environments/test.js.example b/config/environments/test.js.example index 5603f6bb..e0c4ae7b 100644 --- a/config/environments/test.js.example +++ b/config/environments/test.js.example @@ -108,7 +108,7 @@ var config = { elapsedThreshold: 25 // the threshold to determine an slow acquire must be reported or not }, emitter: { - statusInterval: 5000 + statusInterval: 5000 // the time in millisecond between each status report is emitted from the pool } } ,sqlapi: { From 98967cdf8807ad2bd19a669397261c534899954e Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Wed, 15 Oct 2014 16:25:35 +0200 Subject: [PATCH 7/7] Be more clear about the effect of the statusInterval number --- config/environments/development.js.example | 2 +- config/environments/production.js.example | 2 +- config/environments/staging.js.example | 2 +- config/environments/test.js.example | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/environments/development.js.example b/config/environments/development.js.example index 1102b6b2..fafb283f 100644 --- a/config/environments/development.js.example +++ b/config/environments/development.js.example @@ -114,7 +114,7 @@ var config = { elapsedThreshold: 25 // the threshold to determine an slow acquire must be reported or not }, emitter: { - statusInterval: 5000 // the time in millisecond between each status report is emitted from the pool + statusInterval: 5000 // time, in ms, between each status report is emitted from the pool, status is sent to statsd } } ,sqlapi: { diff --git a/config/environments/production.js.example b/config/environments/production.js.example index 49ece937..c4fb2707 100644 --- a/config/environments/production.js.example +++ b/config/environments/production.js.example @@ -108,7 +108,7 @@ var config = { elapsedThreshold: 25 // the threshold to determine an slow acquire must be reported or not }, emitter: { - statusInterval: 5000 // the time in millisecond between each status report is emitted from the pool + statusInterval: 5000 // time, in ms, between each status report is emitted from the pool, status is sent to statsd } } ,sqlapi: { diff --git a/config/environments/staging.js.example b/config/environments/staging.js.example index a20cbf98..d0e93555 100644 --- a/config/environments/staging.js.example +++ b/config/environments/staging.js.example @@ -108,7 +108,7 @@ var config = { elapsedThreshold: 25 // the threshold to determine an slow acquire must be reported or not }, emitter: { - statusInterval: 5000 // the time in millisecond between each status report is emitted from the pool + statusInterval: 5000 // time, in ms, between each status report is emitted from the pool, status is sent to statsd } } ,sqlapi: { diff --git a/config/environments/test.js.example b/config/environments/test.js.example index e0c4ae7b..b2ea2736 100644 --- a/config/environments/test.js.example +++ b/config/environments/test.js.example @@ -108,7 +108,7 @@ var config = { elapsedThreshold: 25 // the threshold to determine an slow acquire must be reported or not }, emitter: { - statusInterval: 5000 // the time in millisecond between each status report is emitted from the pool + statusInterval: 5000 // time, in ms, between each status report is emitted from the pool, status is sent to statsd } } ,sqlapi: {