Pivotal Knowledge Base


How to Collect Basic Information for SQLFire Issues?


Product Version
SQLFire 1.0.x to 1.1.x

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


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):


For additional details about SQLFire logging, refer to the following document:


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):


For more about SQLFire stats collection, refer the following document:


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]
[-bind-address=<addr> (default is hostname or localhost if hostname points to a local loopback address)]

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

sqlf print-stacks allstacks.txt -mcast-port=0 -locators=[10334] -log-level=fine -log-file=serverlogs.log -user=locatoradmin -password=java -auth-provider=BUILTIN
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.


For example (on Windows):

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


Powered by Zendesk