Counting User Connections

To avoid exceeding the maximum number of connections, periodically check the current number of user connections.

The DB_PROPERTY function returns the number of client connections and the number of INC connections made by the secondary nodes to the coordinator.

The INC connections do not affect the number of connections (set by startup parameter -gm) that can be made to the coordinator node.

From the coordinator, run the system function DB_PROPERTY.
SELECT db_property('conncount')