Differences between revisions 3 and 4
Revision 3 as of 2007-07-05 13:01:12
Size: 5053
Comment:
Revision 4 as of 2009-09-20 22:11:34
Size: 5053
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

Annotated derby.properties useful for development and test environments

The following derby.properties file contains properties I find useful when debugging a system using derby. Many of the properties are commented out and should only to enabled when needed to address specific problems (unless you don't care about the additional processing and disk space overhead). The lines where derby properties are commented out start with the string #.. derby.. Refer to the Derby manuals for a more complete description of each property.

######################################################################
#            Example DEBUG derby.properties file 
## Create the derby.properties file in the derby.system.home folder.  
## By default the derby.log file is written to derby.system.home.  If you are unsure
##  where to place the properties use the folder containing the derby.log file.
##  Uncomment properties preceeded by the string '#.. ' to make them active.
###################################################
## The next three properties can be set for all test situations.  They have a 
## very slight performance impact but insure we get all messages 
##  and that the log is not automatically removed.
#  -- Append to the log file rather than overwriting it - manually remove 
#  -- the derby.log when it becomes large
derby.infolog.append=true
#  -- Log all errors/messages of any severity (will list deadlocks)
derby.stream.error.logSeverityLevel=0
#  -- Log all Network Server connections (if any)
derby.drda.logConnections=true
##################################################
##   When you need to trace what requests (SQL) the application(s) is/are 
##     making of Cloudscape set the following property (Uncomment the line).
## !! CAUTION !! : You will need to manage the size of the derby.log file 
##  !!   - it can grow to 100's of MBs or larger !!
# -- Log all SQL received
#.. derby.language.logStatementText=true
###################################################
## Performance problems: 
# --  write query plan to log
#.. derby.language.logQueryPlan=true
###################################################
## If you are encountering locking / concurrency problems set (uncomment) the
##  following two properties
#  -- Log all deadlocks 
#.. derby.locks.monitor=true
# -- Writes a stack trace of all threads involved in lock problems 
# --    (not just the victims) to the log
#.. derby.locks.deadlockTrace=true
####################################################
##  These properties adjust the time a process will wait for a lock and 
##    how often Cloudscape checks for deadlocks.
# -- Hold locks for five minutes before timeout
#.. derby.locks.waitTimeout=300
# -- If deadlocks are occurring lengthen wait 
# --      (waitTimeout must be < deadlockTimeout)
#.. derby.locks.deadlockTimeout=310
#       END of Example properties file

Using the derby.debug.* Properties for Debugging

You can use the property derby.debug.true and derby.debug.false to turn on or off debug options. Both properties take a comma separated list of strings as argument. Each of the strings represents a debug option that is turned on or off.

You can test for the presence of a debug option using SanityManager.DEBUG_ON(String):

if (SanityManager.DEBUG && SanityManager.DEBUG_ON("MyFeature") { 
  System.out.println("MyFeature is enabled");
} 

Printing will then be enabled if you start a sane Derby with -Dderby.debug.true=MyFeature

Existing Debug Options

Here is an (incomplete) list of debug options that currently (r547775) exist in Derby:

  • AggregateTrace

  • AssertFailureTrace

  • AuthenticationTrace

  • ByteCodeGenInstr

  • CacheTrace

  • ClassLineNumbers

  • DaemonOff

  • DaemonTrace

  • DeadLockTrace

  • debug_deadlock
  • debug_lost_latch
  • DumpBindTree

  • DumpClassFile

  • DumpLogOnly

  • DumpOptimizedTree

  • dumpPageImage
  • DumpParseTree

  • enableBtreeConsistencyCheck
  • forceBetaUpgrade
  • leaf_split_abort1
  • leaf_split_abort2
  • leaf_split_abort2
  • leaf_split_abort4
  • leaf_split_growRoot1
  • leaf_split_growRoot2
  • leaf_split_growRoot3
  • leaf_split_growRoot4
  • leaf_split_growRoot5
  • LoadTran

  • LockStackTrace

  • LockTrace

  • LockTraceAddThreadInfo

  • LogBufferOff

  • LogTrace

  • memoryLeakTrace
  • MethodResolutionInfo

  • MonitorNewInstanceFromId

  • RunForever

  • ScanTrace

  • SerializedTrace

  • setCheckPoint
  • SkipUnitTests

  • SortTuning

  • SpaceTrace

  • SPS!NameCacheTrace

  • StopAfterBinding

  • StopAfterGenerating

  • StopAfterOptimizing

  • StopAfterParsing

  • TEST_BAD_CHECKSUM
  • TEST_LOG_FULL
  • TEST_LOG_INCOMPLETE_LOG_WRITE
  • TEST_LOG_SWITCH_LOG
  • TEST_MULTI_ALLOC_PAGE
  • TEST_SWITCH_LOG_FAIL1
  • TEST_SWITCH_LOG_FAIL2
  • testMaxLogFileNumber
  • testSort
  • traceSavepoints
  • TranTrace

  • verbose_btree_post_commit
  • verbose_heap_post_commit
  • XATrace

DebugPropertiesTmpl (last edited 2009-09-20 22:11:34 by localhost)