java
Java-Monitor Forum > Forum > Tomcat Administration » Is there a max number of pools java-monitor can monitor?
Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 27-01-2012, 16:54
jaymyo jaymyo is offline
Junior Member
 
Join Date: Apr 2010
Posts: 2
Default Is there a max number of pools java-monitor can monitor?

My tomcat server (v7) has conf/context.xml containing 8 jdbc resources. Tomcat has 8 folders in its webapps and the java-monitor overview page correctly shows 64 rows database pool progress bars against the host.

If I add a new resource in the context.xml, I expected 72 database pools (ie 9 connections * 8 app folders) but the overview now shows 63(!?) Also, instead of number of pools-per-resource increase to 9, some of them have decreased to 7. The number of charts in the host has also decreased. The more resources (or apps) I add, the more random it becomes, with inconsistent number of pools and charts. Each application does still work and connect successfully whether java-monitor is displaying the connection pool or not. I've tried redeploying everything and restarting to Tomcat.

Any ideas?

It's vital the jdbc connections are shared amongst all apps in the conf/context.xml instead of an app-specific context.

Any suggestions appreciated folks...
Reply With Quote
  #2  
Old 29-01-2012, 14:33
kjkoster kjkoster is online now
Forum Operator
 
Join Date: Jul 2008
Posts: 1,137
Default

Dear jaymyo,

There is indeed a limit on the number of items to store for a type. We thought 64 would be high enough for anyone. ;-)

What you are seeing is your list of connection pools arbitrarily be limited to the maximum number of items. The cut-off is rather crude and hence the artifacts.

What you are seeing is actually a problem with the way Tomcat registers MBeans for your database connections. It creates one pool for each configured data source (which seems to be 9 in your case) and it then creates one MBean for each data source in each web app (9*8 in your case). From a system administration point of view you only need to see the 9 pools that are actually there. Not the 72 uses of those 9 pools.

I'll have a look at the probe code to see if there is a simple way to resolve this and reduce the output to the actual pools in the case of a Tomcat server.

Another thing: It worries me that you say that it is "vital the jdbc connections are shared amongst all apps". Why is that? Dependencies between web apps are not according to the JEE specc's intentions and you cannot depend on all app servers to work the same way.

Why do you need these to be shared between the apps?

Kees Jan
Reply With Quote
  #3  
Old 29-01-2012, 15:39
jaymyo jaymyo is offline
Junior Member
 
Join Date: Apr 2010
Posts: 2
Default

Hi kjkoster,

Thanks for your reply - much appreciated.

To answer your question about the jdbc connections being shared across all apps...

I develop and deploy servlet apps to several tomcat servers we host. The management of customer access and database connections is managed by another team who maintain the conf/context.xml file on each server. When we get a new customer, a schema is built and jdbc connection created without any involvement or app redeployment by me. This can happen daily. I can also redeploy apps whenever I want knowing security will never be compromised.

I completely agree that of the 64 pools I see, I only want to see 16 of them (2 apps * 8 connections).

If you (or anyone reading this) know of a way to dedicate jdbc connections to a specific app on tomcat, which can be managed outside the app's webapps folder, then please post advice/a link.

Finally kjkoster, even if someone knows a solution to my last request, it would still be very handy if the 64 item limit could be lifted within the probe.

Thanks again,

Jay
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump