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.
Configuration steps
If you don’t already have an ActiveGate set up, you need to install an ActiveGate.
ActiveGate configuration (for example, proxy settings, or memory dump settings), is stored in config.properties
and custom.properties
files, located in the ActiveGate configuration directory.
The configuration file config.properties
is overwritten during each update of ActiveGate. Thus, any customized settings stored in this file will be lost (with some exceptions). To avoid losing your customized settings with each update, store customized settings in the custom.properties
file instead. Settings stored in this file take precedence over corresponding settings in config.properties
, and the file is copied to the newly installed version of ActiveGate.
The custom.properties
file will initially be empty. To specify customized settings, enter section names and include the properties within these sections. We recommend that you first locate the relevant section in the config.properties
file and then copy the section title along with the names of the desired properties into custom.properties
If you modify the custom.properties
file, restart the ActiveGate to put your changes into effect.
Edit the custom.properties
file of your ActiveGate.
This file is located in the config
folder of your ActiveGate:
- Linux systems:
/var/lib/dynatrace/gateway/config
- Windows systems:
%PROGRAMDATA%\dynatrace\gateway\config
Note: On Windows, the %PROGRAMDATA%
directory is usually hidden for non-privileged users. Therefore you cannot select it by browsing through folders. Instead, to access the folder, paste the folder path directly into a Windows Explorer address box.
Create the [collector]
section (if it doesn't already exist). Specify the DumpSupported
property in this section and set the value to true
.
[collector]
DumpSupported = true
optional
By default, ActiveGate saves memory dumps in %PROGRAMDATA%\dynatrace\gateway\dump
on Windows and in /var/lib/dynatrace/gateway/dump
on Linux. These directories need to have appropriate permissions set.
To specify a custom path, create the [dump]
section (if it doesn't already exist). Specify the dumpDir
property in this section. For example:
[dump]
dumpDir = dump
The dumpDir
property can be 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 folder, 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:
-
Linux systems:
Read
,Write
, andExecute
-
Windows systems:
Read
,Write
, andModify
Also in the [dump]
section, specify the following properties:
maxSizeGb
maximum size, in GB, for stored memory dumpmaxAgeDays
maximum age, in days, for keeping stored memory dumpsmaxConcurrentUploads
maximum number of concurrent file uploads supported
Restart the ActiveGate.