No ManagedConnections - Steps to increase pool size

No ManagedConnections - Steps to increase pool size

From the logs we were able to identify the error trace as [org.apache.catalina.authenticator.NMSFormAuthenticator]|[WARNING]|[68]|: Unexpected error while forwarding to login page : {0}|javax.servlet.ServletException: org.jboss.util.NestedSQLException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] ); - nested throwable: (javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] ))"

If the server / client is non-responsive, there could be multiple reasons. however unavailability of the DB connections mostly the culprit. 

Possible errors that can be found in serverout*.txt file will be

No Managed Connection available. 

Interrupted while requesting permit. 

* This could happen in a scenario where you have more than 100 users accessing in a given time, 

For this, edit the file 'mysql-ds.xml' (for mysql) / 'mssql-ds.xml' (for mssql) using a text editor (Notepad / VI) found under \\Manageengine\\SupportCenter\\server\\default\\deploy  and append the following parameters depending upon number of concurrent users, before, </local-tx-datasource>


For more than 200 users, 

 <min-pool-size>5</min-pool-size>
<max-pool-size>219</max-pool-size>
<idle-timeout-minutes>1</idle-timeout-minutes>
<check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
<blocking-timeout-millis>20000</blocking-timeout-millis>
<prepared-statement-cache-size>30</prepared-statement-cache-size>

Less than 200 users, 

<idle-timeout-minutes>1</idle-timeout-minutes>
<check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
<blocking-timeout-millis>20000</blocking-timeout-millis>
<prepared-statement-cache-size>30</prepared-statement-cache-size>

* Application restart is required for changes to take effect. 


For reference, here is the brief explanation of these parameters, 

min-pool-size and max-pool-size : 

By default we will have 20 connections pools, these parameters would increase the number of ​connections to 219, this would impact the performance of the application only if you have MSSQL installed on a very high configuration server (>10 Gb of RAM). If it is less(<= 4 gb of RAM) then increasing connections would make heavy load to the MSSQL server and it will become almost non-responsive and hang the application.

idle-timeout-minutes : By default it will be 15 mins. Since it is set to 1 min the unused connections would return to the pool and it will decrease the number of active connections to the Mssql.

check-valid-connection-sql : 

This would have our application will to validate the connection whenever it returns from the pool which means, if the connection is forcibly closed by the database server, this tells the Jboss to discard the connection and create a new one

prepared-statement-cache-size : 

the number of prepared statements per connection to be kept open and reused in subsequent requests. The default is 0 (zero), meaning no cache.

                    New to ADSelfService Plus?

                      • Related Articles

                      • Steps for Performance Tuning

                        Supportcenter Plus performance can be improved by tuning the JAVA performance as said below : For version 8: 1. Shut down the application. 2. Navigate into \SupportCenter\server\default\conf 3. Edit the file -> wrapper.conf with administrator ...
                      • How to install GlowRoot for performance related issue in SCP 11.0

                        Kindly follow the steps below, 1.Download the GlowRoot.zip file from this link 2.Extract the folder to the <drive>:\ManageEngine\SupportCenter Plus -directory 3.Edit run.bat file present in the SupportCenterPlus/bin folder and add the highlighted ...
                      • Glowroot for Linux

                        The below steps are for version 11 1. From the attachments download the glowroot.zip and extract it under [Product_home]. Ex: <drive>:\ManageEngine\SupportCenter Plus -directory. 2. Edit run.sh file and add the below entry JAVA_OPTS="$JAVA_OPTS ...
                      • Change the default font-size and font-family while sending emails from SCP

                        Kindly try the following steps below, Access the database and initiate the query below select * from globalconfig where category = 'rta'; It will list out the global config categories and from the list check for the  globalconfigid for font -size and ...
                      • Inputs required for analyzing Performance Issues

                        We need a couple of details to analyze Performance issue. So, please send the below details : Below mentioned details should be gathered before restarting the application. 1. Let us know whether you are taking Scheduled full backup or backup without ...