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
Dashboard Version | Yes/No |
---|---|
Dashboards v1 | |
Dashboards v2 |
- Deploy dashboard WAR or JAR file by following the steps in the link Standalone Engineering Dashboard deployment
- Configure deployed WAR or JAR as per Standalone Engineering Dashboard deployment using WAR file#ForCASTDashboards2.x
- Restart Dashboards
- 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
Perform the below actions
- Determine the CSS host from the log where error is encountered.
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 :
- If too many connections are consumed by dashboards, perform the below changes.
- If dashboards are deployed using WAR navigate to <Tomcat>\webapps\<WAR>\WEB-INF\classes and open application.properties file.
- If dashbaoards are deployed using JAR navigate to <Dashboard-install-path>\HDED and open application.properties file.
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
Add below parameter and set appropriate value.
spring.datasource.maximumPoolSize=2
- Restart Tomcat or dashboard service
- If the above steps do not solve your issue contact CAST Technical Support with the Relevant input in order to reproduce the issue.
Ticket # 43363, 33686