Oracle SOA Suite 11g Performance Tuning Cookbook
上QQ阅读APP看书,第一时间看更新

Monitoring the data source usage

Oracle SOA Suite applications make a very heavy use of database connections, so if the connection pools get exhausted, then performance can suffer dramatically. By monitoring the data source usage, you can ensure that the number of available connections is sufficient.

Getting ready

You will need to install Oracle SOA Suite and the Hyperic HQ server and agents for this recipe. Both Hyperic HQ and Oracle SOA Suite will need to be running. You will also need the login credentials for the Hyperic HQ console.

How to do it...

By following these steps, we can monitor the data source usage:

  1. Log in to the Hyperic HQ console.
  2. Open the Resources menu, and select Browse.
  3. Select the platform that has the server you want to monitor, which should be one of your SOA Suite managed servers.
  4. On the left-hand side of the Resources panel, select the WebLogic managed server that you wish to monitor.
  5. Select the data sources entry in the Resources pane on the left-hand side.
  6. Select the data source you are interested in from the Resources pane on the left-hand side.
  7. The graph pane will now display the metrics for the data source, including the number of active connections.
  8. Use the display range settings at the top of the graph pane to select the time period you are interested in.

How it works...

The Hyperic HQ Agent periodically connects to the WebLogic server instances that are in its inventory, and uses the JMX service to obtain metrics on a number of measurements, including the data source usage. It reports this data back to the server, which stores it in its database. We can then view this collected data by using the Hyperic console.

The metrics we are interested in are the individual metrics for each data source, rather than the aggregate metrics that Hyperic also provides. These individual metrics allow us to see which data sources are getting low on available connections, and do something about it before they run out. Because connection pools should not usually be running near their maximum limits, this is a good candidate for configuring alerting.

There's more...

A common problem with data sources is the application code that leaks connections, which occurs when there is a use-case within the application that results in a connection being taken from the pool, but never returned. This is usually found in edge-cases because it is often quickly spotted in testing in the main use-cases. The symptoms of a connection leak are that the baseline number of active connections keeps rising, giving the appearance of something similar to a set of steps.

See also

  • The Installing the Hyperic server, Installing Hyperic agents, and Configuring Configuring Alerts in Hyperic recipes