🚨 Oracle WebLogic Server: How I Approach a High CPU Issue
A high CPU alert on a WebLogic server doesn't always mean the JVM itself is the problem.
A structured troubleshooting approach can help identify the actual source.
🔹 1. Check OS-level CPU
Start by identifying which process is consuming CPU:
top
or
ps -ef | grep java
Don't immediately restart the server. First identify the process and PID.
🔹 2. Identify the WebLogic JVM
Once the Java PID is identified, verify:
• Which Managed Server is using the JVM
• JVM heap configuration
• Number of threads
• GC activity
• Application workload
🔹 3. Check WebLogic Thread Activity
Look for:
• Stuck threads
• Excessive thread usage
• Long-running requests
• Connection pool issues
• Repeated application requests
The WebLogic Administration Console and server logs can provide useful clues.
🔹 4. Take Thread Dumps
For CPU-related issues, thread dumps can help identify what the JVM threads are actually doing.
Take multiple thread dumps at intervals rather than relying on a single snapshot.
Example:
jstack <PID> > threaddump1.txt
Then compare the dumps to identify threads that remain active.
🔹 5. Check Garbage Collection
High CPU can also be associated with excessive GC activity.
Review:
• Young GC
• Full GC
• Heap utilization
• GC frequency
• Pause times
🔹 6. Check Application-Level Processes
Sometimes the WebLogic JVM is only where the symptom appears.
The underlying cause may be:
➡️ Application code
➡️ Infinite/repeated processing
➡️ Database calls
➡️ External service calls
➡️ Incorrect configuration
➡️ Memory/GC pressure
🔹 7. Don't Treat Restart as the Root-Cause Fix
Restarting the Managed Server may temporarily reduce CPU, but it doesn't explain why the CPU increased.
A better approach is:
Alert → Identify PID → Analyze threads → Check GC → Review logs → Identify root cause → Apply fix → Monitor
This approach helps convert a production incident from a "restart and recover" activity into a proper troubleshooting exercise.
💡 Key takeaway:
High CPU is a symptom. The goal is to identify the workload or thread causing it.
What other WebLogic troubleshooting topics would you like to see?
Top comments (0)