Visit Azul.com Support

Diagnostic Configuration Options

Table of Contents
Need help?
Schedule a consultation with an Azul performance expert.
Contact Us

As described on CRS Configuration Options, the Connected Runtime Service (CRS) inside the Azul JVM and Azul Intelligence Cloud Agent can be configured according to your use-case. While setting up Intelligence Cloud in your environment, or troubleshooting a problem, you can use additional JVM properties or CRS arguments.

Diagnostic Command Line Options

Command Line Option Default Description

-XX:AzCRSNativeMemoryAreaSize=<size>[k|K|m|M|g|G]

2Mb

Size of the Java off-heap memory reserved for CRS to store class loading and first method call events in a native buffer until they are processed.

This value can be increased for diagnostic purposes - but should be handled with care - in the following circumstances:

  • If a large number of class and method events is expected.

  • If this error message is logged which indicates that some events were lost due to insufficient memory:

     
    CRS native buffer overflow, data is lost [<number> -> <number>]

Diagnostic JVM Properties

The following JVM properties are provided by CRS for troubleshooting.

Property Default Description

com.azul.crs.jarload.debug

false

Used to print some debug info about JarLoadMonitor and methods parsing jar’s central directory

com.azul.crs.jarload.dedupSize

500

The size of known jar hashes (after reporting 501 uniq jars, loading jar that is the same as first one, causes new jar loaded event)

com.azul.crs.jarload.forceFullJarLoadedEvents

false

Always send full jar loaded event (including shaded hashes, entries crs, and nested jar entries central directories hashes)

com.azul.crs.jarload.genericCentralDirectoryProvider

generic

Able to change fallback algorithm of getting central directory from default stream-based to one of existing (generic, jdk, spring.1.x, spring.2.x)

com.azul.crs.jarload.genericProvider.bufferSize

8 * 1024

Buffer size used in stream-based algorithm of getting jar’s central directory hash

com.azul.crs.jarload.genericProvider.maxBuffers

128

Number of buffers used in the stream-based algorithm. The algorithm reads jar suffix into that buffer list. All buffer content gets aligned to bufferSize, that means in the worst case, you can expect that the central directory length should be less than bufferSize * (maxBuffers - 1).

bufferSize and maxBuffers need to be used in case this specific log is found:

 
central directory sha256 calculation ended with exception ... caused by RuntimeException at ZipTools$GenericCentralDirectoryFactory

This error can be observed with jar files in which the CentralDirectory is bigger than 512kb (40 + <file name length> bytes per file stored in the zip).

com.azul.crs.jarload.jarLoadByClassLoad

true

Whether class load event should trigger jar loaded event? jar loaded event is triggered only if prefix of class source (effectively equals to jar url) does not equal already reported jar (the list of known jars restricted by dedupSize above)

com.azul.crs.jarload.jarLoadMonitorTaskQueueSize

1000

Maximum number of tasks allowed to have in the queue

com.azul.crs.jarload.tempfilesTimeToLive

30min

Maximum time allowed to live for temp files (in case if it was not deleted earlier by backend confirmation that related jar file is already known)

com.azul.crs.jarload.enableFromClassLoaders

false

Enable to use ClassLoader.urls to look for loaded jars

Example Use Case

This is an example to change a few of the default properties:

 
java -Dcom.azul.crs.jarload.jarLoadMonitorTaskQueueSize=1500 \ -Dcom.azul.crs.jarload.dedupSize=1000

Diagnostics CRS Arguments

Next to the arguments which can be used to configure CRS, additional arguments are provided for troubleshooting.

Argument Default Description

delayInitiation

2000

Setting this to a higher value (in milliseconds), e.g. 120000, delays the start of activities to rule out conflicts with application startup.

forceSyncTimeout

Number of milliseconds for the synchronization timeout of cached data

notifyJarLoad

true

Send JAR and component information.

notifyClassLoad

true

Send class level information.

notifyFirstCall [1]This option is not available in the Azul Intelligence Cloud Agent

false

Enables the Code Inventory functionality at the method level. When set to true, it sends events of the first method execution to the Forwarder.

maxJarFileCacheSize

2048

Number of Kb to define the limit of the temporary file system usage to cache jar files.

sendJVMLogs [1]This option is not available in the Azul Intelligence Cloud Agent

false

Flag to define if (GC/JFR/JVM) logs should be send to Intelligence Cloudto the cloud.

heartbeat

4

Number of seconds for your JVM to keep its long-lasting connection to the Forwarder open. Raising this may improve Java 11+ through its HTTP2 connections but may cause timeout/new connections with Java 8 HTTP 1.1.

printParameters

false

Print the value of all CRS arguments.

log

error

Logging as described in CRS Configuration Options can be extended with channel information:

  • service.jfr (JFRMonitor.java)

  • service.vmlog (VMLogMonitor.java)

  • service.gclog (GCRotatingLogTailer.java)

  • service.jarload (JarLoadMonitor.java)

  • service.gclog (GCLogMonitor.java)

  • service.vmtooling (VMToolingClient.java)

  • service.classload (ClassLoadMonitor.java)

  • service.firstcall (FirstCallMonitor.java)

  • service.systeminfo (SystemInfoProvider.java)

  • args (Options.java)

  • inventory (Inventory.java)

  • vmsupport (VMSupport.java)

Note
If you have unexpected errors, try to turn logging off completely to check if some parsed input causes conflicts in CRS.

Example Use Cases

  • To get all debug info related to a specific part of CRS, for example, how first calls are monitored, add the following to your CRS arguments:

     
    -XX:AzCRSArguments=...,log+service.firstcall=debug
  • If you want to use Azul Intelligence Cloud to help in a migration process, and want as little overhead as possible, then you only need the JVM information. This info is collected as one of the first events when your application starts. Once that event is sent, there are no more messages to be handled. In that case, when you use the Azul Intelligence Cloud Agent, it disconnects from the Forwarder for the rest of the JVM life. To achieve this, add the following options to your CRS arguments:

     
    -XX:AzCRSArguments=...,notifyClassLoad=false,notifyJarLoad=false