I hacked up a completely naive implementation using psycopg2.pool. It seems
to work ok here on F31, but this would need a lot of clean up.
https://github.com/mikem23/koji-playground/commits/connection-pool
On Fri, May 29, 2020 at 3:27 PM Ken Dreyer <ktdreyer(a)ktdreyer.com> wrote:
The default RHEL 7 and 8 postgresql.conf ships with
"max_connections =
100".
RHEL 7's httpd uses the prefork MPM by default, and RHEL 8's httpd
uses the event MPM by default instead.
It seems that RHEL 8 opens many more simultaneous connections to the
database, and it's very easy to hit PostgreSQL's 100 max_connections
limit. In my tests, it's possible to get ServerOffline errors with
just one or two clients. For example, running kojira with kojiweb will
hit ServerOffline.
When I bump postgresql.conf to "max_connections = 500" I cannot reach
the limit on el8.
Before we tell users to bump this number in the Server HowTo guide,
I'm wondering if there is a better way to improve this in Koji's code.
https://wiki.postgresql.org/wiki/Number_Of_Database_Connections
recommends connection pooling instead of opening more connections, but
I don't know how to implement this.
- Ken
_______________________________________________
koji-devel mailing list -- koji-devel(a)lists.fedorahosted.org
To unsubscribe send an email to koji-devel-leave(a)lists.fedorahosted.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedorahosted.org/archives/list/koji-devel@lists.fedorahoste...