Update to latest config of db sql api and windshaft
This commit is contained in:
parent
7704e1cfa7
commit
3397aed11d
@ -30,6 +30,27 @@ module.exports.db_host = 'localhost';
|
||||
module.exports.db_port = '5432';
|
||||
module.exports.db_batch_port = '5432';
|
||||
module.exports.finished_jobs_ttl_in_seconds = 2 * 3600; // 2 hours
|
||||
module.exports.batch_query_timeout = 12 * 3600 * 1000; // 12 hours in milliseconds
|
||||
module.exports.batch_log_filename = 'logs/batch-queries.log';
|
||||
// Max number of queued jobs a user can have at a given time
|
||||
module.exports.batch_max_queued_jobs = 64;
|
||||
// Capacity strategy to use.
|
||||
// It allows to tune how many queries run at a db host at the same time.
|
||||
// Options: 'fixed', 'http-simple', 'http-load'
|
||||
module.exports.batch_capacity_strategy = 'fixed';
|
||||
// Applies when strategy='fixed'.
|
||||
// Number of simultaneous users running queries in the same host.
|
||||
// It will use 1 as min.
|
||||
// Default 4.
|
||||
module.exports.batch_capacity_fixed_amount = 4;
|
||||
// Applies when strategy='http-simple' or strategy='http-load'.
|
||||
// HTTP endpoint to check db host load.
|
||||
// Helps to decide the number of simultaneous users running queries in that host.
|
||||
// 'http-simple' will use 'available_cores' to decide the number.
|
||||
// 'http-load' will use 'cores' and 'relative_load' to decide the number.
|
||||
// It will use 1 as min.
|
||||
// If no template is provided it will default to 'fixed' strategy.
|
||||
module.exports.batch_capacity_http_url_template = 'http://<%= dbhost %>:9999/load';
|
||||
// Max database connections in the pool
|
||||
// Subsequent connections will wait for a free slot.
|
||||
// NOTE: not used by OGR-mediated accesses
|
||||
|
@ -23,6 +23,21 @@ var config = {
|
||||
// "tiles/layergroup" is for compatibility with versions up to 1.6.x
|
||||
,base_url_detached: '(?:/api/v1/map|/user/:user/api/v1/map|/tiles/layergroup)'
|
||||
|
||||
// Resource URLs expose endpoints to request/retrieve metadata associated to Maps: dataviews, analysis node status.
|
||||
//
|
||||
// This URLs depend on how `base_url_detached` and `user_from_host` are configured: the application can be
|
||||
// configured to accept request with the {user} in the header host or in the request path.
|
||||
// It also might depend on the configured cdn_url via `serverMetadata.cdn_url`.
|
||||
//
|
||||
// This template allows to make the endpoints generation more flexible, the template exposes the following params:
|
||||
// 1. {{=it.cdn_url}}: will be used when `serverMetadata.cdn_url` exists.
|
||||
// 2. {{=it.user}}: will use the username as extraced from `user_from_host` or `base_url_detached`.
|
||||
// 3. {{=it.port}}: will use the `port` from this very same configuration file.
|
||||
,resources_url_templates: {
|
||||
http: 'http://cartodb.localhost:{{=it.port}}/user/{{=it.user}}/api/v1/map',
|
||||
https: 'http://cartodb.localhost:{{=it.port}}/user/{{=it.user}}/api/v1/map'
|
||||
}
|
||||
|
||||
// Maximum number of connections for one process
|
||||
// 128 is a good value with a limit of 1024 open file descriptors
|
||||
,maxConnections:128
|
||||
@ -96,6 +111,10 @@ var config = {
|
||||
// Important: check the configuration of uv_threadpool_size to use suitable value
|
||||
poolSize: 8,
|
||||
|
||||
// Whether grainstore will use a child process or not to transform CartoCSS into Mapnik XML.
|
||||
// This will prevent blocking the main thread.
|
||||
useCartocssWorkers: false,
|
||||
|
||||
// Metatile is the number of tiles-per-side that are going
|
||||
// to be rendered at once. If all of them will be requested
|
||||
// we'd have saved time. If only one will be used, we'd have
|
||||
@ -210,6 +229,18 @@ var config = {
|
||||
endpoint: 'http://127.0.0.1:8080/api/v2/sql/job',
|
||||
// the template to use for adding the host header in the batch api requests
|
||||
hostHeaderTemplate: '{{=it.username}}.localhost.lan'
|
||||
},
|
||||
logger: {
|
||||
// If filename is given logs comming from analysis client will be written
|
||||
// there, in append mode. Otherwise 'log_filename' is used. Otherwise stdout is used (default).
|
||||
// Log file will be re-opened on receiving the HUP signal
|
||||
filename: '/tmp/analysis.log'
|
||||
},
|
||||
// Define max execution time in ms for analyses or tags
|
||||
// If analysis or tag are not found in redis this values will be used as default.
|
||||
limits: {
|
||||
moran: { timeout: 120000, maxNumberOfRows: 1e5 },
|
||||
cpu2x: { timeout: 60000 }
|
||||
}
|
||||
}
|
||||
,millstone: {
|
||||
|
Loading…
Reference in New Issue
Block a user