Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vrtnd committed Sep 4, 2024
1 parent cadd9f3 commit 03b3d72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/wrappa/postgres/write.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ export const closeIdleConnections = async (idleTimeMinutes = 3) => {
SELECT pg_terminate_backend(pid)
FROM pg_stat_activity
WHERE state = 'idle'
AND state_change < NOW() - INTERVAL '${idleTimeMinutes} minutes'
AND state_change < NOW() - INTERVAL '3 minutes'
AND pid <> pg_backend_pid()
)
SELECT COUNT(*) as closed_count FROM closed;
Expand Down

0 comments on commit 03b3d72

Please sign in to comment.