Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script calm.sql:
- select pg_cancel_backend(pid) from pg_stat_activity where state not like 'idle%' and now() - query_start > '20 seconds' and query ~ 'bib search' order by 1 desc;
- cron entry (as postgres):
- */1 * * * * psql -U evergreen < /var/lib/postgresql/scripts/calm.sql >> /var/lib/postgresql/scripts/calm.log
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement