How to resolve "sorry, too many clients already" error observed in the cs_repository***.log in TIBCO Data Virtualization?

How to resolve "sorry, too many clients already" error observed in the cs_repository***.log in TIBCO Data Virtualization?

book

Article ID: KB0071311

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization All supported versions

Description

TIBCO Data Virtualization Server uses the Postgres database internally for its repository. When the TDV repository database runs low on available connections, it logs entries similar to the below in the cs_repository-<day>.log.

[cisrepo 127.0.0.1(52002) 50659]FATAL:  sorry, too many clients already



 

Issue/Introduction

TIBCO Data Virtualization (TDV) repository log may log entries related to "too many clients already" when its has reached the available limit for the connections. This article helps address the problem.

Environment

All environments

Resolution

To address this problem, follow the below steps in increasing the connection limit : 

The maximum number of available connections for TDV to the repository database is configured via the max_connections property in the <TDV_Install_Dir>\repository\data\postgresql.conf file.
By default, the available max_connections is 100.

max_connections = 100            # (change requires restart)

With increased memory and heap size for the TDV process, it utilizes the repository database extensively. This may result in the reported "Sorry, too many clients" error. Increasing the max_connections value to a higher value shall help address the reported problem.

There isn't a single configuration that fits all requirements. As a thumb rule, setting this value between 100-200 for servers that have a memory utilization of about 150 GB, and up to about 300 GB for memory utilization between 200 - 300 is optimal. The number of connections that are increased should be done in increments of 25-50 each time, monitor the performance of the system before further tuning it up. Setting to a higher value initially without testing may lead to resource wastage. 

Note:
1. <TDV_Install_Dir>\repository\data_cache\postgresql.conf corresponds to TDV internal Cache DB.
2. A restart of the Repository service (Postgresql DB) and TDV Monitor is required for the changes to take effect.