Troubleshooting JVM Issues with Glowroot

Liferay DXP 2023.Q4+/Portal 7.4 GA100+

Glowroot displays a dashboard for identifying system issues quickly. Click the Errors tab to see a list of tracked errors. The following topics are common Java environment issues you may encounter and some tips on how to use Glowroot to help you troubleshoot them.

Java Deadlock

A deadlock occurs when multiple threads can’t be processed because another thread is using a resource. The application may become slow or unresponsive.

If a deadlock is suspected, click the JVM tab in Glowroot. Click Thread dump in the left navigation menu. Analyze the output to find deadlocks.

Click the JVM tab and select thread dump.

Thread Leak

A thread leak occurs when many new threads are created, but the threads are not properly managed and closed when they are no longer needed. Over time, these threads can consume too many system resources and affect performance.

If a thread leak is suspected, a possible indicator is a java.lang.OutOfMemory error. Click the Errors tab in Glowroot and check for any errors. Use the MBean tree to see a list of all running threads. Click the JVM tab and click Mbean tree in the left navigation. Scroll down to the java.lang section and click Threading.

Click the JVM tab and select the Mbean tree.

Database Deadlock

A database deadlock occurs when two or more processes, or transactions, are waiting for each other to release a resource.

Check the trace of a transaction in Glowroot for slow transactions. Click the Transactions tab. Under the transactions panel, click Slow traces. Use the chart to find transactions that are taking too long to identify possible deadlocks.

Click slow traces to see transactions that take a long time.

Database Connection Pool Issues

A database connection leak occurs when a program or application fails to release or close a database connection properly after it is no longer needed. This can lead to the depletion of available database connections and cause a slowdown of the system.

In Glowroot, click the Errors tab to check for connection pool timeout errors or check the status of the database connections. Click the JVM tab and click Mbean tree in the left navigation. Scroll down to the com.zaxxer.hikari section and click Pool (HikariPool-1). See the number of active connections and threads awaiting connections. You may need to increase the pool size depending on your use cases.

To add the Hikari connection pool to the gauges dashboard, navigate to ConfigurationGauges. Click Add new and search for com.zaxxer.hikari:type=Pool (HikariPool-1). Select all the Mbean attributes and click Add.

Add the Hikari connection pool to the gauges dashboard.

Click the JVM tab and click Gauges in the left menu. The Hikari connection pool can now be monitored in the gauges dashboard.

Capabilities

Product

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy