When running a plugin, a java.lang.OutOfMemoryError may occur if too much data is being processed for the system to handle.
If that issues arises, you will need to modify the java_args field of the "master" newrelic.json file located in the npi base config directory.
java_args - -Xmx128m (-Xmxn specifies the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2 MB.
Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is chosen at runtime based on system configuration.)
-Xmx83886080 -Xmx81920k -Xmx80m
FATAL ERROR: JS Allocation failed - process out of memory
If you see FATAL ERROR: JS Allocation failed - process out of memory during installation, edit newrelic-npi/npi replacing
bin/node npi.js "$@"
bin/node --max-old-space-size=4096 npi.js "$@" #modified for 4gb memory