Interpreting resource pool diagnostic data
You can view diagnostic information for troubleshooting
purposes in NexJ System Admin Console
on the current state of a dynamic resource pool. You can also view
diagnostic information in application logs.
The following relevant information displays for the Pool Manager component:
- refCount
- The number of deactivation locks held by the model. The pool manager shuts down after the model releases all the locks.
- dirty
- Indicates whether managed resources are available. Managed resources are available when the pool manager has successful started at least one of the dynamic resource pools that it manages.
- receiveEnabled
- Indicates whether the pool is running consumers. The pool is running consumers when the pool manager has started thread pools for the channels configured with "receive" enabled.
- started
- Indicates whether the pool manager is started.
The following relevant information displays for Dynamic Pools:
- busyTimeout
- The amount of time in milliseconds within which the pool must return a resource. If the time is exceeded, an exception occurs.
- idleTimeout
- The time in milliseconds after which a resource not in use by the system is deallocated, or removed from memory, by the pool.
- maxSize
- The maximum number of resources the pool can allocate.
- activeCount
- The number of resources that are "in use" by the resource pool. For example, a resource is in use when the model has requested a resource but has not yet returned it to the pool.
- idleCount
- The number of resources that are considered "unused" by the resource pool. For example, an unused resource has been returned to the pool by the model.
- Active
- Active resources contain the following information:
- lastUse
- The amount of time in milliseconds since the model used the resource. For example, for a database connection, the amount of time since the model issued a command to the database using this connection.
- refCount
- The number of active locks held by the model. The model
tracking resources as "in use" that it must later return it to
the pool. The refCount for an active resource should always be
greater than
0
. - DiagnosticTraceHolder
- The allocation stack frame for the resource. This includes the threadName, schemeStack, and systemStack. The threadName is the name of the thread on which the resource was allocated. The schemeStack and systemStack display the model stack trace and JVM stack trace, respectively.
- Idle
- Idle resources contain the following information:
- lastUse
- The amount of time in milliseconds since the model returned the resource to the pool.
- refCount
- The number of active locks held by the model. The refCount
for an idle resource should always be
0
.
The following example show sample diagnostic information that displays in NexJ System Admin Console:
Dumping state:
PoolManager@612953243(refCount=2, dirty=#t, receiveEnabled=#t, started=#t)
TimerConsumerPool@-1813454240(config=Timer SystemTimer, idleTimeout=60000, maxSize=-1, activeCount=1, idleCount=5)
Active:
TimerConsumer@1418540913(lastUse=2922ms)
DiagnosticTraceFactory$DiagnosticTraceHolder@-2043524576(threadName=NexJ TimerConsumerPool@-1813454240(config=Timer SystemTimer) #1982966392)
systemStack:
at nexj.core.rpc.pool.DiagnosticTraceFactory.createTrace(DiagnosticTraceFactory.java:73)
at nexj.core.util.pool.consumer.GenericConsumerPool.getConsumer
(GenericConsumerPool.java:612)
at nexj.core.rpc.timer.TimerConsumerPool.listen(TimerConsumerPool.java:213)
at nexj.core.util.pool.consumer.GenericConsumerPool.run(GenericConsumerPool.java:339)
at nexj.core.rpc.pool.ThreadPool$Worker$1$1.run(ThreadPool.java:244)
Idle:
TimerConsumer@-893672451(lastUse=5422ms)
TimerConsumer@1109848281(lastUse=5422ms)
TimerConsumer@1385997586(lastUse=2922ms)
TimerConsumer@1518144107(lastUse=2422ms)
TimerConsumer@792830408(lastUse=2422ms)
...
RelationalDatabaseConnectionPool@209607608(fragment=RelationalDatabaseFragment DefaultRelationalDatabase.[default], busyTimeout=10000, idleTimeout=60000, maxSize=33, activeCount=0, idleCount=2)
Idle:
SQLConnection@377940976(lastUse=12738ms, refCount=0)
SQLConnection@-1703396080(lastUse=1ms, refCount=0)