Cortex XSOAR may show incorrect memory usage when using Go lang v.1.12 and above
0
Created On 11/19/20 19:10 PM - Last Modified 07/19/22 23:19 PM
Symptom
In Go Lang version 1.12 and above, on Linux machines, runtime uses MADV_FREE to release unused memory, which may result in a higher reported RSS. In some monitoring systems, Cortex XSOAR (version 5.5 and above) may show that it is consuming more memory than it actually is.
NOTE: When upgrading, you need to perform this procedure again as the changes made are overridden by the upgrade.
Environment
- Cortex XSOAR (version 5.5 and above)
- Go Lang version 1.12 and above, on Linux machines
Resolution
To show the correct usage:
- Open the Cortex XSOAR service file by going to /etc/systemd/system/demisto.service.
- In the [Service] section add the following line:
Environment="GODEBUG=madvdontneed=1"
For example, the Cortex XSOAR service file should look like this:
For example, the Cortex XSOAR service file should look like this:
- Type the following commands:
- sudo systemctl daemon-reload
- sudo service demisto restart