-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
issue for pgsql-test
Summary
Postgres intermittently throws:
sorry, too many clients already
or
remaining connection slots are reserved for roles with the SUPERUSER attribute
indicating the test framework is exhausting available connections.
Cause
Unclosed or overlapping connections during parallel tests, or a low max_connections limit. It could be failing/breaking tests eat connections and we need to clean those up.
temporary fix / debug:
-- List all current connections
SELECT pid, usename, state, query
FROM pg_stat_activity;
-- Terminate all idle connections
SELECT pg_terminate_backend(pid)
FROM pg_stat_activity
WHERE state = 'idle' AND pid <> pg_backend_pid();
-- (optional) terminate all except your current one
SELECT pg_terminate_backend(pid)
FROM pg_stat_activity
WHERE pid <> pg_backend_pid();Metadata
Metadata
Assignees
Labels
No labels