JDBC Causes WebLogic Server Hang Support Pattern
(Doc ID 1135278.1)
Last updated on SEPTEMBER 22, 2020
Oracle WebLogic Server - Version 6.1 and later Information in this document applies to any platform.
This document discusses how to troubleshoot and fix WebLogic Server hang caused by JDBC configuration and related resources.
A JDBC connection which is used by an application or by WebLogic Server itself will block one WebLogic Server execute thread for the complete duration of the calls that are made via this connection. The JVM will ensure that the CPU is given to runnable threads by its thread scheduling mechanism, while the thread that blocks on a SQL query needs to wait. However, the thread occupied by the JDBC call will be reserved and used for the application until the call returns from the SQL query.
Even a transaction timeout will not kill or timeout any action that is done by the resources that are enlisted in this transaction. The actions will run as long as they take, without interruption. A transaction timeout will set a flag on the transaction that will mark it as rollback only, so that any subsequent request to commit this transaction will fail with a TimedOutException or RollbackException. However, as mentioned above, the long running JDBC calls can lead to blocked WebLogic Server execute threads, which can finally lead to a hanging instance, if all threads are blocked and no execute thread remains available for handling incoming requests.
More recent WebLogic Server versions have a health check functionality that regularly checks if a thread does not react for a certain period of time (the default is 600 seconds). If this happens, an error message is printed to your log file similar to following:
Different programming techniques or JDBC connection pool configurations can lead to deadlocks or long running JDBC calls that lead to hanging WebLogic Server instances. General information about how to troubleshoot and analyze a hanging WebLogic Server instance is provided in the Generic Server Hang Pattern (<note 782125.1>).
This pattern addresses JDBC calls causing a server hang and other well-known JDBC-related causes for common problems leading to hanging WebLogic Server instance.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!