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.
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
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.
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
If you modify the
custom.properties file, restart the ActiveGate to put your changes into effect.
custom.properties file of your ActiveGate.
This file is located in the
config folder of your ActiveGate:
- Linux systems:
- Windows systems:
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.
[collector] section (if it doesn't already exist). Specify the
DumpSupported property in this section and set the value to
[collector] DumpSupported = true
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
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:
Example of dump directory permissions in Windows
Also in the
[dump] section, specify the following properties:
maxSizeGbmaximum size, in GB, for stored memory dump
maxAgeDaysmaximum age, in days, for keeping stored memory dumps
maxConcurrentUploadsmaximum number of concurrent file uploads supported
Restart the ActiveGate.
[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