From b311f0e09196ec1fa652f1cff45fc756c853890a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Fri, 25 May 2018 18:38:31 +0200 Subject: [PATCH] Add generic pool configuration to postgres global config --- config/environments/development.js.example | 10 +++++++++- config/environments/production.js.example | 10 +++++++++- config/environments/staging.js.example | 10 +++++++++- config/environments/test.js.example | 10 +++++++++- 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/config/environments/development.js.example b/config/environments/development.js.example index 503ac0d4..2a849fd0 100644 --- a/config/environments/development.js.example +++ b/config/environments/development.js.example @@ -118,7 +118,15 @@ var config = { user: "publicuser", password: "public", host: '127.0.0.1', - port: 5432 + port: 5432, + pool: { + // maximum number of resources to create at any given time + size: 16, + // max milliseconds a resource can go unused before it should be destroyed + idleTimeout: 3000, + // frequency to check for idle resources + reapInterval: 1000 + } } ,mapnik_version: undefined ,mapnik_tile_format: 'png8:m=h' diff --git a/config/environments/production.js.example b/config/environments/production.js.example index 0dc6275f..5b1d50b8 100644 --- a/config/environments/production.js.example +++ b/config/environments/production.js.example @@ -118,7 +118,15 @@ var config = { user: "publicuser", password: "public", host: '127.0.0.1', - port: 5432 + port: 5432, + pool: { + // maximum number of resources to create at any given time + size: 16, + // max milliseconds a resource can go unused before it should be destroyed + idleTimeout: 3000, + // frequency to check for idle resources + reapInterval: 1000 + } } ,mapnik_version: undefined ,mapnik_tile_format: 'png8:m=h' diff --git a/config/environments/staging.js.example b/config/environments/staging.js.example index 67a49e78..805f4ae7 100644 --- a/config/environments/staging.js.example +++ b/config/environments/staging.js.example @@ -118,7 +118,15 @@ var config = { user: "publicuser", password: "public", host: '127.0.0.1', - port: 5432 + port: 5432, + pool: { + // maximum number of resources to create at any given time + size: 16, + // max milliseconds a resource can go unused before it should be destroyed + idleTimeout: 3000, + // frequency to check for idle resources + reapInterval: 1000 + } } ,mapnik_version: undefined ,mapnik_tile_format: 'png8:m=h' diff --git a/config/environments/test.js.example b/config/environments/test.js.example index 5619c8ac..f0484a6b 100644 --- a/config/environments/test.js.example +++ b/config/environments/test.js.example @@ -119,7 +119,15 @@ var config = { user: "test_windshaft_publicuser", password: "public", host: '127.0.0.1', - port: 5432 + port: 5432, + pool: { + // maximum number of resources to create at any given time + size: 16, + // max milliseconds a resource can go unused before it should be destroyed + idleTimeout: 3000, + // frequency to check for idle resources + reapInterval: 1000 + } } ,mapnik_version: '' ,mapnik_tile_format: 'png8:m=h'