Merge pull request #695 from CartoDB/feature/ch176620/servinformacion-is-causing-load-issues-in
Use a command timeout as a fallback when user's rendering timeout is deactivated
This commit is contained in:
commit
f1260f16c6
@ -57,6 +57,7 @@ module.exports.db_pubuser_pass = 'public';
|
|||||||
module.exports.db_host = process.env.CARTO_SQL_API_POSTGRES_HOST || 'localhost';
|
module.exports.db_host = process.env.CARTO_SQL_API_POSTGRES_HOST || 'localhost';
|
||||||
module.exports.db_port = process.env.CARTO_SQL_API_POSTGRES_PORT || '6432';
|
module.exports.db_port = process.env.CARTO_SQL_API_POSTGRES_PORT || '6432';
|
||||||
module.exports.db_batch_port = process.env.CARTO_SQL_API_POSTGRES_BATCH_PORT || '5432';
|
module.exports.db_batch_port = process.env.CARTO_SQL_API_POSTGRES_BATCH_PORT || '5432';
|
||||||
|
module.exports.export_command_timeout = 5 * 60 * 1000; // 5 minutes in milliseconds
|
||||||
module.exports.finished_jobs_ttl_in_seconds = 2 * 3600; // 2 hours
|
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_query_timeout = 12 * 3600 * 1000; // 12 hours in milliseconds
|
||||||
module.exports.copy_timeout = "'5h'";
|
module.exports.copy_timeout = "'5h'";
|
||||||
|
@ -52,6 +52,7 @@ module.exports.db_pubuser_pass = 'public';
|
|||||||
module.exports.db_host = 'localhost';
|
module.exports.db_host = 'localhost';
|
||||||
module.exports.db_port = '5432';
|
module.exports.db_port = '5432';
|
||||||
module.exports.db_batch_port = '5432';
|
module.exports.db_batch_port = '5432';
|
||||||
|
module.exports.export_command_timeout = 5 * 60 * 1000; // 5 minutes in milliseconds
|
||||||
module.exports.finished_jobs_ttl_in_seconds = 2 * 3600; // 2 hours
|
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_query_timeout = 12 * 3600 * 1000; // 12 hours in milliseconds
|
||||||
module.exports.copy_timeout = "'5h'";
|
module.exports.copy_timeout = "'5h'";
|
||||||
|
@ -53,6 +53,7 @@ module.exports.db_pubuser_pass = 'public';
|
|||||||
module.exports.db_host = 'localhost';
|
module.exports.db_host = 'localhost';
|
||||||
module.exports.db_port = '6432';
|
module.exports.db_port = '6432';
|
||||||
module.exports.db_batch_port = '5432';
|
module.exports.db_batch_port = '5432';
|
||||||
|
module.exports.export_command_timeout = 5 * 60 * 1000; // 5 minutes in milliseconds
|
||||||
module.exports.finished_jobs_ttl_in_seconds = 2 * 3600; // 2 hours
|
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_query_timeout = 12 * 3600 * 1000; // 12 hours in milliseconds
|
||||||
module.exports.copy_timeout = "'5h'";
|
module.exports.copy_timeout = "'5h'";
|
||||||
|
@ -53,6 +53,7 @@ module.exports.db_pubuser_pass = 'public';
|
|||||||
module.exports.db_host = 'localhost';
|
module.exports.db_host = 'localhost';
|
||||||
module.exports.db_port = '6432';
|
module.exports.db_port = '6432';
|
||||||
module.exports.db_batch_port = '5432';
|
module.exports.db_batch_port = '5432';
|
||||||
|
module.exports.export_command_timeout = 5 * 60 * 1000; // 5 minutes in milliseconds
|
||||||
module.exports.finished_jobs_ttl_in_seconds = 2 * 3600; // 2 hours
|
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_query_timeout = 12 * 3600 * 1000; // 12 hours in milliseconds
|
||||||
module.exports.copy_timeout = "'5h'";
|
module.exports.copy_timeout = "'5h'";
|
||||||
|
@ -50,6 +50,7 @@ module.exports.db_pubuser_pass = 'public';
|
|||||||
module.exports.db_host = process.env.PGHOST || 'localhost';
|
module.exports.db_host = process.env.PGHOST || 'localhost';
|
||||||
module.exports.db_port = '5432';
|
module.exports.db_port = '5432';
|
||||||
module.exports.db_batch_port = '5432';
|
module.exports.db_batch_port = '5432';
|
||||||
|
module.exports.export_command_timeout = 5 * 60 * 1000; // 5 minutes in milliseconds
|
||||||
module.exports.finished_jobs_ttl_in_seconds = 2 * 3600; // 2 hours
|
module.exports.finished_jobs_ttl_in_seconds = 2 * 3600; // 2 hours
|
||||||
module.exports.batch_query_timeout = 5 * 1000; // 5 seconds in milliseconds
|
module.exports.batch_query_timeout = 5 * 1000; // 5 seconds in milliseconds
|
||||||
module.exports.copy_timeout = "'5h'";
|
module.exports.copy_timeout = "'5h'";
|
||||||
|
@ -58,7 +58,15 @@ OgrFormat.prototype.toOGR = function (options, outFormat, outFilename, callback)
|
|||||||
var dbpass = dbopts.pass;
|
var dbpass = dbopts.pass;
|
||||||
var dbname = dbopts.dbname;
|
var dbname = dbopts.dbname;
|
||||||
|
|
||||||
var timeout = options.timeout;
|
var timeout = 5 * 60 * 1000; // 5 minutes in milliseconds
|
||||||
|
|
||||||
|
if (Number.isFinite(global.settings.export_command_timeout)) {
|
||||||
|
timeout = global.settings.export_command_timeout;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Number.isFinite(options.timeout) && options.timeout > 0) {
|
||||||
|
timeout = options.timeout;
|
||||||
|
}
|
||||||
|
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user