Diagnosing Stuck Threads in oacore on Oracle EBS 12.2

In Oracle EBS 12.2, system hangs, login failures, or forms not loading are often due to stuck threads in WebLogic’s oacore server. This guide outlines a systematic approach to diagnose and resolve such issues.


🔍 Step-by-Step Diagnostic Workflow

1. Review oacore Logs


Navigate to the oacore server logs (e.g., oacore_server?.log, -diagnostic.log, .out) under $EBS_DOMAIN_HOME/servers/oacore_server?/logs and look for stuck-thread warnings.

2. Detect Stuck Threads and Extract ECID


Search for lines like BEA-000337 indicating a thread has been busy for hundreds of seconds. Extract the ECID-Context, which contains a unique identifier for tracing the issue.

3. Use ECID to Query Active Sessions


Trim the ECID and query Oracle’s AWR or ASH views:

SELECT *
FROM gv$active_session_history
WHERE ecid LIKE '%<trimmed-ECID>%';

This identifies the user session and activity causing the problem.

4. Retrieve SQL Text and Bind Variables


Once you have the SQL_ID, run a query to pull the statement and bind values tied to the stuck session:

SELECT b.name, b.value_string, sq.sql_text, ...
FROM gv$sql_bind_capture b
JOIN gv$sql sq ON ...
WHERE sq.sql_id = '<SQL_ID>';

This helps pinpoint slow or errant SQL 

✅ Recommended Actions

  • Investigate the identified SQL in dev/test environments to optimize or refactor.

  • Adjust WebLogic thresholds, such as StuckThreadMaxTime, to reduce excessive thread hang behavior.

  • Open an SR with Oracle, including ECID thread dumps and session details, to assist with deeper root cause analysis.


No comments:

Post a Comment