Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connection Pool Monitoring

I need an insight on monitoring connection pool in my web application.
The technical specifications about the application is mentioned below:

  1. Application Server - JBoss Application Server
  2. Database - Oracle 10g
  3. Back-end - Hibernate

I need to know that what are the different ways of monitoring connection pool and how we can do that. Whether through Hibernate or through JBoss or anyother way? Please suggest me the right way to do that.

like image 581
IMJS Avatar asked Nov 23 '11 12:11

IMJS


2 Answers

FlexyPool is a data source proxy offering better monitoring and failover for almost all known connection pools:

  • Apache DBCP
  • Apache DBCP2
  • C3P0
  • BoneCP
  • HikariCP
  • Tomcat CP
  • Vibur DBCP
  • Bitronix Transaction Manager
  • Atomikos TransactionsEssentials

It allows you monitor the following metrics:

  • concurrent connections histogram
  • concurrent connection requests histogram
  • data source connection acquiring time histogram
  • connection lease time histogram
  • maximum pool size histogram
  • total connection acquiring time histogram
  • overflow pool size histogram
  • retries attempts histogram

This way you can adjust the pool size so that it can accommodate as many application nodes as possible while protecting you from some unexpected traffic spikes.

like image 165
Vlad Mihalcea Avatar answered Sep 21 '22 04:09

Vlad Mihalcea


I found that when using JConsole as suggested in other answers to connect to JBoss (5.2) via JMX the MBeans for the Connection Pooling were not visible.

Instead I used the built in JMXConsole typically available at: http://localhost:8080/jmx-console - you may have to change the hostname and port for your deployment.

If this is running you will see a username and password prompt.
The default username/password is: admin/admin
I found the first time I tried this, nothing happened, I had to update the file: server/default/conf/props/jmx-console-users.properties and uncomment the 2nd line:

# A sample users.properties file for use with the UsersRolesLoginModule
admin=admin

Once this was done I could login. At that point in the ObjectName Filter I entered: jboss.jca:* I then selected the appropriate connection pool link for example: name=DefaultDS,service=ManagedConnectionPool which shows all the connection pool information, e.g. AvailableConnectionCount, InUseConnectionCount etc.

like image 31
ptha Avatar answered Sep 23 '22 04:09

ptha