Configure ActiveGate for memory dump storage

Applicable to Environment ActiveGate and Cluster ActiveGate

The following configuration of ActiveGate for memory dump storage is applicable to both Environment ActiveGate and Cluster ActiveGate.

When your application experiences memory leaks or high object churn, it’s important that you get memory dumps so you can analyze these issues. In production environments, this is often a challenge when you can’t log into the environment and you have no other means of triggering memory dumps. Dynatrace enables you to both trigger and securely download memory dumps to the analysis tool of your choice. To enable memory dumps, you need to configure your ActiveGate as described below.

If you configure an ActiveGate to collect memory dumps, and then restart the ActiveGate service, all instances of OneAgent will automatically reconnect and recognize that the ActiveGate can now store memory dumps. From now on, whenever a memory dump is successfully triggered, the dump will be uploaded automatically to the correct ActiveGate. Once safely stored on the ActiveGate, the OneAgent deletes the local file from its storage.

Before you begin

Familiarize yourself with the basic rules for working with ActiveGate configuration.

Activate dump functionality

Create the [collector] section in the custom.properties file, if it doesn't already exist. Specify the DumpSupported property in this section and set the value to true.

[collector]
DumpSupported = true

Specify dedicated dump directory (optional)

Unless configured otherwise, ActiveGate saves memory dumps in a default directory.

To use a custom path, specify the path in the properties file and create the directory with appropriate permissions:

Create the [dump] section in custom.properties (if it doesn't already exist) and then specify the dumpDir property in this section. For example:

[dump]
dumpDir = dump

The dumpDir property can contain a relative path, for example, dumpDir = mydir. In this case, the directory will be a subdirectory of the default location. It can also be an absolute path, for example, dumpDir = C:\data\memory-dumps.

Create the directory, if it does not already exist, and make sure that it has correct access permissions for the user running the ActiveGate service. This is by default dtuserag for Linux, and Local Service for Windows:

Use of /temp or /tmp under Linux

Because of possible automatic purging, we recommend that you not use the Linux directories /temp, /tmp, or their subdirectories to install ActiveGate or store any data generated or used by ActiveGate.

Specify parameters for managing dump files (optional)

Also in the [dump] section, you can specify the following properties:

Property Default value Description
dumpDir dump Valid path of the storage directory used for dump storage
maxSizeGb 100 Storage quota in GBs. If full, the oldest dumps are overwritten until enough space is available to store a new dump.
maxAgeDays 7 Maximum age of a memory dump in days until the dump is automatically overwritten
maxConcurrentUploads 5 Maximum number of concurrent dump uploads from OneAgents
downloadUrl unset A custom download URL (for example, if ActiveGate is behind a load balancer or if ActiveGate only detects an IP address and the user requires an FQDN). The URL must contain the correct schema and port.

Restart ActiveGate

If you modify your ActiveGate configuration, you must restart the ActiveGate service to put your changes into effect.

Example custom.properties file contents

[collector]
DumpSupported = true

[dump]
# relative to collector root dir or absolute path
dumpDir = dump
# maximum size in GB for stored memory dump
maxSizeGb = 100
# maximum age in days for keeping stored memory dumps
maxAgeDays = 7
# maximum number of concurrent file uploads supported
maxConcurrentUploads = 5