Pivotal Knowledge Base

Follow

How to Collect Basic Information for SQLFire Issues?

Environment

Product Version
SQLFire 1.0.x to 1.1.x


Purpose
This document contains guidelines for collecting basic information such as logs, statistics files, thread dumps, and heap dumps for SQLFire issues.


Resolution

1) Logs of Locator and SQLFire Server

Copy logs from the location defined in the [log-file] property of their sqlfire.properties file or given as a parameter of your startup script at the time of the issue.
For example (from the sqlfire.properties file):

log-level=fine
log-file=log/node1.log

For additional details about SQLFire logging, refer to the following document:
http://pubs.vmware.com/vfabric53/topic/com.vmware.vfabric.sqlfire.1.1/manage_guide/Topics...

 

2) Statistics files of Locator and SQLFire Server

Copy any stats files from the location defined by the [statistic-archive-file] property of sqlfire.properties.
For example (sqlfire.properties):

statistic-sampling-enabled=true
statistic-sample-rate=2000
statistic-archive-file=myStatisticsArchiveFile.gfs
enable-time-statistics=true

For more about SQLFire stats collection, refer the following document:
http://pubs.vmware.com/vfabric53/topic/com.vmware.vfabric.sqlfire.1.1/manage_guide/Topics...

 

3) Thread dumps

For some issues, such as hung systems or performance issues, thread dumps from the server or client are essential for analyzing the issue. Best practice recommends that multiple thread dumps are taken periodically (i.e. every few seconds) over a period of time.

Thread dumps can be taken using the following procedure:

Step 1. Find out the relevant SQLFire process id, i.e:

$ jps -l
7904 sun.tools.jps.Jps
5388 sample.JClient

Step 2. Generate the thread dump(s).

On Solaris, Linux, and other Unix platforms, sending a SIGQUIT signal to the SQLFire Java process will generate a thread dump(s), i.e.:

kill -QUIT <pid>

In Windows, you can press the CTRL-Break keys in the command shell where the SQLFire Java process was started.

Alternatively, these tools can be used to generate the thread dump:

A. jstack command: jstack <pid>
B. Java VisualVM (jvisualvm)
C. jconsole


SQLFire also provides the following internal command to collect the thread dumps for entire distributed system.

Usage: sqlf print-stacks [<filename>] [-J-D<vmprop>=<prop-value>]
[-mcast-port=<port> (default 10334)]
[-mcast-address=<address> (default 239.192.81.1)]
[-locators=<addresses>]
[-bind-address=<addr> (default is hostname or localhost if hostname points to a local loopback address)]
[-<prop-name>=<prop-value>]*

For example:
sqlf print-stacks allstacks.txt -mcast-port=0 -locators=192.168.159.132[10334] -log-level=fine -log-file=serverlogs.log

sqlf print-stacks allstacks.txt -mcast-port=0 -locators=192.168.159.132[10334] -log-level=fine -log-file=serverlogs.log -user=locatoradmin -password=java -auth-provider=BUILTIN
ps:
When you are using sqlfire.properties, please run this command in a path with sqlfire.properties.

 

4) Heap dump

For investigating memory related issues, such as an Out Of Memory issue or a Memory Leak, a heap dump will help track down underlying issues.

Generate the heap dump of SQLFire process using the following:

Step 1. First, identify the specific SQLFire process id using a command like 'jps' (as in the procedure for getting thread dumps).

Step 2. Generate the heap dump.

A. Using jmap command

[JDK_INSTALLATION]/bin/jmap -dump:live,format=b,file=heap.dump.out <pid>

B. Using Java VisualVM (jvisualvm):

1. run [JDK_INSTALLATION]/bin/jvisualvm,
2. select the target thread and select, [Application] menu-->[Heap Dump], and select the generated heap dump, then choose [Save As] "to local disk."

C. Getting a Heap Dump Automatically on an "Out Of Memory" error:

Add the following jvm parameter to the java process before it starts.

-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath

For example (on Windows):

JAVA_OPTS=%JAVA_OPTS% "-XX:+HeapDumpOnOutOfMemoryError" "-XX:HeapDumpPath=C:\TEMP"

Comments

Powered by Zendesk