From 9aa7120feebee259c0535ff349823ff78352b422 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Mon, 30 May 2022 14:36:33 +0200 Subject: [PATCH] frontend: double the connection limit on PostgreSQL server This needs better debugging, but our connection pooling is probably pretty complicated (each WSGI daemon process can have 15 connections to DB, 5+10 overflow). And we have _many_ processes nowadays, while the default connection limit is 100 in PostgreSQL. --- roles/copr/frontend/tasks/psql_setup.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/roles/copr/frontend/tasks/psql_setup.yml b/roles/copr/frontend/tasks/psql_setup.yml index a788395471..d80a8fd06d 100644 --- a/roles/copr/frontend/tasks/psql_setup.yml +++ b/roles/copr/frontend/tasks/psql_setup.yml @@ -109,6 +109,15 @@ tags: - config +- name: set max_connections for PostgreSQL + lineinfile: + path: /var/lib/pgsql/data/postgresql.conf + regexp: '^max_connections =' + line: 'max_connections = 200' + notify: restart postgresql + tags: + - config + - name: install psqlrc file copy: content: |