- If you are experiencing Too many connections errors, they are a symptom of possible connection leaks in BeanShell or custom plugins (if you are not using the default datasource). See Database Connection Monitoring and Leak Detection.
- You may wish to increase the maximum connection value. However, the default database maximum active configuration is already at 500. This means 500 concurrent database connections. This is a very high number for large deployment. If each real world user uses an average of 10 connections at any time, means there are roughly 50 users using the app.
- Increasing the maxActive might not be a good idea to solve the issue if there are connection leaks in your app's custom BeanShell/plugins. No matter how large the number you set, it will eventually be exhausted. This is why you must confirm that all the connections are closed properly in the plugins & custom scripts.
- Do check bean shell plugins and custom scripts, not just the currently running app but every other app in your Joget platform that is running. Delete apps that are not used/needed. One way is to export all your apps to the server and one by one unzip it to extract the appDefinition.xml file and using a text editor, search for BeanShell with SQL codes in each app. Find the full list of your custom plugins in "[JogetFiler]\wflow\app_plugins".
- As an admin, use the Performance Analyzer and Application Performance Management (APM) to check for slow queries
- Do try to also check all running queries in the database as this would tell you what is hogging the database connections. At the database level, database engines have many options to view running/slow queries.
- In Joget DX, Joget is using Tomcat JDBC pool (reference: https://tomcat.apache.org/tomcat-8.0-doc/jdbc-pool.html#Common_Attributes ).
From v6 onwards, admins can configure JDBC pool library settings in the datasource .properties file, for example see line 7 and onwards:
Reference: Apache Tomcat 8 (8.5.71) - The Tomcat JDBC Connection Pool