Adjust the PostgreSQL Max Connections
High-availability deployments require more connections than those provided by the default value. Set the value high enough to account for the connection pool sizes of all Nexus Repository nodes as well as a buffer for DBAs and automated tools that connect directly to the database.
Adjust the
max_connections
property in PostgreSQL’spostgresql.conf
file.
Increasing the connections available requires more resources for the PostgreSQL server. Make sure your server has enough resources to handle the additional load. See the PostgreSQL requirements for recommendations on server sizing. Your specific reference architecture also includes these recommendations.
Determining the max_connections
Consider the following example:
3 Nexus Repository nodes in an HA cluster
Each node has the default
maximumPoolSize
setting of 100 connectionsFor this case, we recommend setting the
max_connections
to350
.
Troubleshooting
Nexus Repository nodes may fail to start when not enough connections are available. You may see the following error in PostgreSQL:
FATAL: sorry, too many clients already