From 2e85e130c82ad978dbde8186c4960f0d82252322 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Wed, 30 Jan 2019 10:41:39 +0100 Subject: [PATCH] Be able to customize max waiting workers parameter --- NEWS.md | 5 +++-- config/environments/development.js.example | 4 ++++ config/environments/production.js.example | 4 ++++ config/environments/staging.js.example | 4 ++++ config/environments/test.js.example | 4 ++++ lib/cartodb/server_options.js | 1 + 6 files changed, 20 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index c9fb1de9..33743cee 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,7 +2,7 @@ **Deprecation warning**: Next major release will drop support for `Node.js 6 LTS`, `npm 3.x` and `yarn`. You'll be able to use the latest ES features as soon as we release 7.0.0. In the meantime, as a developer, you should keep compatibility with Node.js 6 LTS and keep updated both `package-lock.json` and `yarn.lock` files. -## 6.5.2 +## 6.6.0 Released 2018-mm-dd Announcements: @@ -14,7 +14,8 @@ Announcements: - Update dev deps: - jshint@2.9.7 - mocha@5.2.0 - +- Be able to customize max waiting workers parameter +- Handle max number of waiting workers error as `429 Too many requests` error. ## 6.5.1 Released 2018-12-26 diff --git a/config/environments/development.js.example b/config/environments/development.js.example index be15ca6c..0cddec6c 100644 --- a/config/environments/development.js.example +++ b/config/environments/development.js.example @@ -139,6 +139,10 @@ var config = { // Important: check the configuration of uv_threadpool_size to use suitable value poolSize: 8, + // The maximum number of waiting clients of the pool of internal mapnik backend + // This maximum number is per mapnik renderer created in Windshaft's RendererFactory + poolMaxWaitingClients: 64, + // Whether grainstore will use a child process or not to transform CartoCSS into Mapnik XML. // This will prevent blocking the main thread. useCartocssWorkers: false, diff --git a/config/environments/production.js.example b/config/environments/production.js.example index c058e27f..f73a095c 100644 --- a/config/environments/production.js.example +++ b/config/environments/production.js.example @@ -139,6 +139,10 @@ var config = { // Important: check the configuration of uv_threadpool_size to use suitable value poolSize: 8, + // The maximum number of waiting clients of the pool of internal mapnik backend + // This maximum number is per mapnik renderer created in Windshaft's RendererFactory + poolMaxWaitingClients: 64, + // Whether grainstore will use a child process or not to transform CartoCSS into Mapnik XML. // This will prevent blocking the main thread. useCartocssWorkers: false, diff --git a/config/environments/staging.js.example b/config/environments/staging.js.example index 8d89e43f..9bef903d 100644 --- a/config/environments/staging.js.example +++ b/config/environments/staging.js.example @@ -139,6 +139,10 @@ var config = { // Important: check the configuration of uv_threadpool_size to use suitable value poolSize: 8, + // The maximum number of waiting clients of the pool of internal mapnik backend + // This maximum number is per mapnik renderer created in Windshaft's RendererFactory + poolMaxWaitingClients: 64, + // Whether grainstore will use a child process or not to transform CartoCSS into Mapnik XML. // This will prevent blocking the main thread. useCartocssWorkers: false, diff --git a/config/environments/test.js.example b/config/environments/test.js.example index 184675a7..7f4e4149 100644 --- a/config/environments/test.js.example +++ b/config/environments/test.js.example @@ -139,6 +139,10 @@ var config = { // Important: check the configuration of uv_threadpool_size to use suitable value poolSize: 8, + // The maximum number of waiting clients of the pool of internal mapnik backend + // This maximum number is per mapnik renderer created in Windshaft's RendererFactory + poolMaxWaitingClients: 64, + // Whether grainstore will use a child process or not to transform CartoCSS into Mapnik XML. // This will prevent blocking the main thread. useCartocssWorkers: false, diff --git a/lib/cartodb/server_options.js b/lib/cartodb/server_options.js index 5c19ee9a..5c9da8c6 100644 --- a/lib/cartodb/server_options.js +++ b/lib/cartodb/server_options.js @@ -9,6 +9,7 @@ var rendererConfig = _.defaults(global.environment.renderer || {}, { statsInterval: 60000, mapnik: { poolSize: 8, + poolMaxWaitingClients: 64, metatile: 2, bufferSize: 64, snapToGrid: false,