0

1.We have a J2EE application using Servlets & JSPs running on Jboss EAP-6.2, and using SQL server database.

2.Everything was fine on UAT system where users count was 20 but when we moved the same application to production system where users count is more than 80 , we are facing issue in Jboss regarding connection pool count. This count keeps on decreasing and after 8-10 hours, users are not able to login in the system so we need to Flush the connection pool manually by clicking the Flush button available in Datasource section in Profile tab.

3.We have checked there are no connection leakage, as we have closed all the database connection in the Finally{ } section.

4.We have also increased the max-min pool size in STANDALONE.XML file and added some validation tags recommended by RedHat site.Please see attached file.

Question- Is there any way by which we can automate the Flush button functionality available on Jboss Adminstrator console so that idle connections will get destroyed automatically.

Attached - Jboss console view of connection pool. enter image description here

enter image description here

  • If you measure you InUse counter (which means connections which were requested to the pool but still not returned, normally because the transaction is still in place) and it is always increasing its value it can be a symptom that at any place the connection is not released back to the pool. – alphamikevictor Mar 08 '17 at 09:10
  • [Here](https://access.redhat.com/solutions/309913) you have a note by RedHat to check for connection leakage, perhaps can help you. – alphamikevictor Mar 08 '17 at 10:03
  • Hi @alphamikevictor, we have done similar setting like in the link you shared but still nothing is getting printed in Server logs regarding connection leakage. Thanks for you comments and can we make flush button to get clicked automatically without doing manually. – Sagar Joon Mar 08 '17 at 12:33

1 Answers1

0

Ok, if you just want to regularly flush your pool, first create a file (for example commands.cli) with this content:

/subsystem=datasources/data-source=ibpmprod/:flush-idle-connection-in-pool()
/subsystem=datasources/data-source=ibpmprod/:flush-all-connection-in-pool()

Then everytime you want to perform the flush use the cli:

${JBOSS_INSTALLATION_DIR}/bin/jboss-cli.sh -c --file=commands.cli

You should check if flush-idle or flush-all fits better in your needs, and of course you can cronify it so it will run at the frequency/times you need.

alphamikevictor
  • 1,062
  • 6
  • 19