Configure ActiveGate for memory dump storage

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 file, if it doesn't already exist. Specify the DumpSupported property in this section and set the value to true.

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 (if it doesn't already exist) and then specify the dumpDir property in this section. For example:

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:

Specify parameters for managing dump files (optional)

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

  • maxSizeGb maximum size, in GB, for stored memory dump
  • maxAgeDays maximum age, in days, for keeping stored memory dumps
  • maxConcurrentUploads maximum number of concurrent file uploads supported

Restart ActiveGate

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

Example file contents

DumpSupported = true

# 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