Search This Blog

Sunday, 29 November 2015

Threads, ThreadDump in WebLogic - TroubleShooting

Every WebLogic server is one process on the Operating System. Each Java process is going to have multiple Java Threads or Native Threads. The Native threads usage will be optimizing input and output operations between CPU and the system resources.

In many WebLogic/FMW admin interviews people asks the following

Difference between Server Hang, server Crash

In case of Server Hang the incoming requests keep on coming. Where as Server cannot accept the requests from the clients.

What is the meaning of WebLogic server hang?

Potential Causes of Server Hang
  • RMI, RJVM responses – all threads tied up waiting for RJVM, RMI responses
    Application Deadlock 
  • Threads  are all used up, none available for new work.Garbage Collection taking too much time
  • Long Running JDBC calls or JDBC deadlocks lead to a hang
  • JVM hang  during code optimization, may look like server hang
  • JSP compilation causes server hang under heavy load
  • JVM bugs 

Why does the WebLogic Server crash occurs?

When a WebLogic Server crash (or JVM crash, machine crash) an application gets a binary core file produced. The server crashes due to some invalid native code (machine specific code)
Troubleshooting Steps:
  • The WebLogic Server performance pack 
  • Any native libraries accessed with JNI calls 
  • The JVM itself JVM will produce a small log file hs_err_pid.log 
  • If there is a core file produced, run dbx or gdb debuggers on the core file, which will let us know what was the last thread processing

How to take the ThreadDump in WebLogic environment?

Using command line thread dump with kill command with -3 option will take the snapshot of what threads doing in a WebLogic server.

Install and Configure a mail service on Ubuntu

Install ssmtp

Step 1: We must use super previllages then Install ssmtp:

sudo apt-get install ssmtp

Step 2: Edit the ssmtp config file : vi /etc/ssmtp/ssmtp.conf Enter this inside the file:

Step 3: Enter the email address of the person who will receive your email: Now enter this:

Subject: Sent from a terminal!

Your content goes here. Lorem ipsum dolor sit amet, consectetur adipisicing.
(Notice the blank space between the subject and the body.)

To send the email: Ctrl + D

Send mail from ssmtp in Ubuntu box
SSMTP Error:
 Here I got the Authorization failed error

To resolve it I've used the following fix:
Log into your google email account and then go to this link: and set "Access for less secure apps" to ON. Test to see if your issue is resolved. Got It!! it works for me...

WebLogic Books

  • Oracle WebLogic Server 12c: Administration Handbook
  • WebLogic Diagnostic Framework
  • Advanced WebLogic Server Automation
  • Oracle SOA Suite 11g Administrator's Handbook

Popular Posts