Engineering Dashboard - Startup - Dashboard fails to start due to error sorry too many clients already

Purpose

This page will guide you to solve the  error “sorry, too many clients already” while starting engineering dashboard.

Error Log :

org.postgresql.core.v3.ConnectionFactoryImpl.log SQLException occurred while connecting to localhost:2284
org.postgresql.util.PSQLException: FATAL: sorry, too many clients already

For more information refer to : Standalone Engineering Dashboard deployment

Applicable Platform

Dashboard VersionYes/No
Dashboards v1
Dashboards v2

Step by Step scenario

  1. Deploy dashboard WAR or JAR file by following the steps in the link Standalone Engineering Dashboard deployment
  2. Configure deployed WAR or JAR as per Standalone Engineering Dashboard deployment using WAR file#ForCASTDashboards2.x
  3. Restart Dashboards
  4. Observe below error from restapi.log
org.postgresql.core.v3.ConnectionFactoryImpl.log SQLException occurred while connecting to localhost:2284
org.postgresql.util.PSQLException: FATAL: sorry, too many clients already

Action Plan

Perform the below actions

  1. Determine the CSS host from the log where error is encountered.

  2. Connect to pgadmin and run the below query on CSS db which is having too many clients error.

select application_name,count(1) from pg_stat_activity where state=‘idle’ group by application_name order by 2 desc


   Example : ![](https://doc-data.castsoftware.com/TG/attachments/652738750/652738854.png)
3. If too many connections are consumed by dashboards, perform the below changes.
   1. If dashboards are deployed using WAR navigate to <Tomcat>\webapps\<WAR>\WEB-INF\classes and open application.properties file.
   2. If dashbaoards are deployed using JAR navigate to <Dashboard-install-path>\HDED and open application.properties file.
   3. Reduce minimum idle connection limit by modifying the below parameter. Set the value to minimum according to your requirement if dashboards should consume less idle connections in CSS.

      **restapi.datasource[0].minimumIdle=10**
   4. Add below parameter and set appropriate value.

      **spring.datasource.maximumPoolSize=2**
4. Restart Tomcat or dashboard service
5. If the above steps do not solve your issue contact [CAST Technical Support](https://help.castsoftware.com/hc/en-us/requests/new) with the [Relevant input](/export-v2/tg/technical-guides/technical-guides-by-cast-aip-component/cast-imaging-system/) in order to reproduce the issue.

 

**Notes/comments**

Ticket # 43363,  33686

**Related Pages**