It is currently Mon Sep 16, 2019 4:30 am




 Page 1 of 1 [ 2 posts ] 
Author Message
 Post subject: Advanced debugging technique for server hangs
PostPosted: Tue Aug 11, 2009 3:16 am 
Support Staff

Joined: Fri Nov 01, 2002 4:06 am
Posts: 43
If the ChatBlazer server seems to hang, i.e. not responding to incoming connections and messages, but the process is still alive, here is a technique that you can use to help us troubleshoot the problem.

Note: This technique is only applicable for Linux and Solaris operating systems.

Perform the following steps before you restart the ChatBlazer process.

1. Determine the PID of the ChatBlazer process. The PID is usually written out to the file logs/cb8svr.pid. Otherwise you can use the JAVA_HOME/bin/jps command to find out the PID. A sample output is given below.
$/usr/java/jdk1.5.0/bin/jps
26247 CBServer
16154 Jps


In the above example, 26247 is the PID that we want.

2. Dump the stack traces of threads running in the JVM. Do this with the following command: JAVA_HOME/bin/jstack PID. E.g.
$/usr/java/jdk1.5.0/bin/jstack 26247 > stack.log


The above command sends the stack trace to the text file "stack.log". Send us this file so that we can determine the cause of the hang.



_________________
Samuel
ChatBlazer Support
Offline
 Profile  
 
 Post subject:
PostPosted: Tue Aug 11, 2009 3:23 am 
Support Staff

Joined: Fri Nov 01, 2002 4:06 am
Posts: 43
Other than using the jstack command, there are other ways of inducing a stack trace from the Java process.

In Linux or Solaris operating systems, you can send the process a SIGQUIT signal. E.g.
kill -3 26247
OR
kill -SIGQUIT 26247

The process will dump the stack trace to its console. If you are running the ChatBlazer server process in the background, the dump will most probably go into logs/server.out, as specified by cb8svr.sh.

In Windows, you will have to press Ctrl-\ at the console which started the process.



_________________
Samuel
ChatBlazer Support
Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 2 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

cron