Added database pool settings.

This commit is contained in:
DebaucheryLibrarian 2023-12-01 02:19:53 +01:00
parent 1d38ba1141
commit 1e707ccefa
2 changed files with 8 additions and 0 deletions

View File

@ -14,6 +14,13 @@ module.exports = {
},
timeout: 5000,
graphiql: false,
pool: {
min: 0,
max: 20,
acquireTimeoutMillis: 300000,
createTimeoutMillis: 300000,
destroyTimeoutMillis: 300000,
},
},
web: {
host: '0.0.0.0',

View File

@ -6,6 +6,7 @@ const knex = require('knex');
module.exports = knex({
client: 'pg',
connection: config.database.owner,
pool: config.database.pool,
// performance overhead, don't use asyncStackTraces in production
asyncStackTraces: process.env.NODE_ENV === 'development',
// debug: process.env.NODE_ENV === 'development',