Skip to main content

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.

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:

  1. 3 Nexus Repository nodes in an HA cluster

  2. Each node has the default maximumPoolSize setting of 100 connections

    See Maximum Pool Size

  3. For this case, we recommend setting the max_connections to 350.

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