Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  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

...

  1. .

...

  1. 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

...

  1. . 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.
  2. 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

...

  1. plugins & custom

...

  1. scripts.

...

  1. 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".

...

  1. As an admin, use the Performance Analyzer and Application Performance Management (APM) to check for slow queries

...

  1. 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. 

...

  1. In Joget DX, Joget is using Tomcat JDBC pool (reference: https://tomcat.apache.org/tomcat-8.0-doc/jdbc-pool.html#Common_Attributes ).
  2. From v6 onwards, admins can configure JDBC pool library settings in the datasource .properties file, for example see line 7 and onwards:

    Code Block
    titleapp_datasource-default.properties
    linenumberstrue
    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=

...

  1. 
    minEvictableIdleTimeMillis=10000
    timeBetweenEvictionRunsMillis=10000
    numTestsPerEvictionRun=-1
    minIdle=1
    maxActive=

...

  1. 600
    maxWait=10000
English
Reference: Apache Tomcat 8 (8.5.71) - The Tomcat JDBC Connection Pool