Updating the PostgreSQL max_connections setting

The OpenShift PostgreSQL cartridge is configured to allow 100 client connections at the most. If the number of clients connected to the PostgreSQL server goes over this threshold, PostgreSQL will start giving the FATAL too many connections error. In this recipe, you will learn how to update the PostgreSQL cartridge max_connections setting.

The number of maximum connections is dictated by the max_connections setting in the postgresql.conf configuration file. OpenShift does not allow users to modify the postgresql.conf configuration file. The recommended way to change the max_connections setting is by setting an environment variable.

Getting ready

To complete this recipe, you will need an application ...

Get OpenShift Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.