Topic: This article explains how to resolve the error of the following type appearing at run time-
|Extraction through JDBC with extractType: JDBC terminated with exception::External Connection Setup Error: FATAL: sorry, too many clients already|
Environment : This article is written for Diyotta version 4.1
This error appears while loading data from PostgreSQL database to BigInsights database and the max connection limit in the PostgreSQL.config file exceeds during run time.
For example, a PostgreSQL to BigInsights Design and Stream with multiple pipelines is executed.
An error message as given may appear
Extraction through JDBC with extractType: JDBC terminated with exception::External Connection Setup Error: FATAL: sorry, too many clients already
This can be seen in the screenshot given below-
Resolution of Issue
To resolve the above issue, follow the steps given below-
1 . To check the Default max number of connections for PostgreSQL, verify the file Postgresql.config "max_connections" parameter, which is by default set to 100. The file is present in the path $DI_HOME\server\pgsql\data. It can also be verified by logging into PostgreSQL using "psql" command line and executing the following command
The maximum connections limit is displayed.
2. To check the number of active connections for PostgreSQL, use the following query-
|SELECT * FROM pg_stat_activity;|
2. If the number of active connections exceeds the default limit value in the Postgresql.config file, the error appears. To resolve this issue, you need to increase the "max_connections" parameter value in the PostgreSQL.config file.
3. Go to $DI_HOME\server\pgsql\data and open the PostgreSQL.config File.
4. Open the file Postgresql.config and you will see that the default value of max_connections parameter is 100. Change the max_connections as per required value.
Note: The other option is to decrease the batch size of the Pipelines.
5. After configuration is set properly, PostgreSQL services need to be restarted.
6. After restarting the PostgreSQL, verify whether the changes are effective. Run the following query again-
Thus, error due to exceeding the maximum limit of connections is resolved.
On this page