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

                    • Increase/decrease Log Count

                      It is possible to increase/decrease the log files count, however increasing the files will have an impact on the performance of the application. Also it is not recommended to increase the count more than 30. The serverout count can be decreased in ...
                    • 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 adjust widget size in Dashboard

                      1. Under the Dashboard Tab, click on the 3 Horizontal Lines on the right corner and then Organize Widgets. 2. Mouseover on the bottom right corner of the application, the mouse pointer changes. Now press and drag to adjust the size.
                    • How to enable Performance monitoring tool ?

                      To analyze Performance issues, logs and tuning alone won't be sufficient. Hence, we need to follow a few steps to enable the Performance Monitoring tool, which will monitor the application's performance and automatically collects the data when the ...
                    • How to address Performance issue ?

                      Application will face the performance issue because of couple of reasons. 1. System requirements are not met: Refer this link to ensure the specifications are met as per the standards. 2. Application architecture should be 64-bit for better ...