We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82d5dbe commit e9ce674Copy full SHA for e9ce674
electron/databases/postgres.ts
@@ -4,9 +4,10 @@ const connectSQL = async (i: number, URI: string) => {
4
try {
5
const pool= new Pool({
6
connectionString: URI,
7
+ idleTimeoutMillis: 2000, // Time after which idle connections are closed
8
})
9
const client = await pool.connect();
- client.release()
10
+ client.release() // Releases connection back to the pool
11
console.log('connected to sql')
12
return pool;
13
} catch (err) {
0 commit comments