SUSE Manager/PostgreSQL limitations
How to tune PostgreSQL to accept more connections
We allow by default 80 connections to the database. This may not be enough if you tell a large number of clients to execute a large operation at the same time.
If you start getting backtraces in the mail with this message:
Frame connect in /usr/lib64/python2.6/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py at line 179 e = <class 'psycopg2.OperationalError'> FATAL: sorry, too many clients already
... you've reached the maximum available connections in the database.
On larger installations, consider using an external database (at the moment Oracle is the only option).
!!! Only do this if the customer has enough memory in the host and is they are aware that it may cause have some performance loss !!!
We have the tool "pgtune" installed on SUSE Manager.
# cd /var/lib/pgsql/data/ # /usr/bin/pgtune -T Mixed -c 400 -i postgresql.conf -o postgresql.conf.pgtune
- -c defines the maximum number of connections in the pool. Recommended values are either 200 or 400.
Stop all spacewalk services and the database, then swap the configuration files and start everything again:
# spacewalk-service stop # rcpostgresql stop # mv postgresql.conf postgresql.conf.bak # mv postgresql.conf.pgtune postgresql.conf # rcpostgresql start # spacewalk-service startSee related bug at https://bugzilla.novell.com/show_bug.cgi?id=849072