1. 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.
  2. 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.
  3. 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.
  4. 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".
  5. As an admin, use the Performance Analyzer and Application Performance Management (APM) to check for slow queries
  6. 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. 
  7. In Joget DX, Joget is using Tomcat JDBC pool (reference: https://tomcat.apache.org/tomcat-8.0-doc/jdbc-pool.html#Common_Attributes ).
  8. From v6 onwards, admins can configure JDBC pool library settings in the datasource .properties file, for example see line 7 and onwards:

    app_datasource-default.properties
    workflowDriver=com.mysql.jdbc.Driver
    workflowUrl=jdbc\:mysql\://localhost\:3306/jwdb?characterEncoding\=UTF-8
    workflowUser=root
    encryption=B/\uFFFDE\uFFFD\uFFFD1*)\u0004\=\uFFFD\uFFFD\uFFFD\uFFFDy\u0002\uFFFDK\u0007\uFFFD{\uFFFD
    workflowPassword=
    profileName=
    minEvictableIdleTimeMillis=10000
    timeBetweenEvictionRunsMillis=10000
    numTestsPerEvictionRun=-1
    minIdle=1
    maxActive=600
    maxWait=10000



  • No labels