The New Relic Java agent includes a circuit breaker that protects applications from the effects of over-instrumentation. When the circuit breaker detects early symptoms of memory exhaustion, it automatically "trips" and limits instrumentation. The agent stops collecting transaction data until the circuit breaker automatically resets after deciding that resetting is safe.
The circuit breaker takes two parameters into account (heap usage and time spent in garbage collection) to determine when it should trip. The default values for these thresholds are percentages:
- Memory threshold: 20%
- Garbage collection CPU threshold: 10%
When the percentage of free heap memory is less than
memory_threshold, and the CPU time spent doing garbage collection is greater than
gc_cpu_threshold, the circuit breaker trips. When the circuit breaker trips, the agent stops collecting transaction data. Throughput reported in the APM UI will be underreported, and you will not see transaction traces for a period of time.
The circuit breaker trips when it detects signs of memory exhaustion. This can happen for several reasons:
If the circuit breaker trips, try these troubleshooting tips.
If you need more help, check out these support and learning resources:
- Browse the Explorers Hub to get help from the community and join in discussions.
- Find answers on our sites and learn how to use our support portal.
- Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS.
- Review New Relic's data security and licenses documentation.