Closed t83714 closed 1 year ago
options in JDBC connection string won't be applied by the connection pool implementation of ScalikeJDBC JDBC.
Eventually, implement our own pool factory over default commons-dbcp2 pool and leverage its connectionInitSql
config.
Side-effective, the db.default.poolFactoryName
config must stay at value magda
(use MagdaDBConnectionPoolFactory) to make the solution work.
closed via PR: https://github.com/magda-io/magda/pull/3468
Allow setting global SQL statement timeout for registry API
We currently don't allow setting global SQL statement timeout for registry API via Helm chart config.
Adding this config to ensure users have more control over the potential impact of the long queries.
Solution
jdbc:postgresql://localhost:5432/postgres?options=-c%20search_path=test,public,pg_catalog%20-c%20statement_timeout=90000
session.queryTimeout(seconds: Int)