• /
  • ログイン

Circuit breaker for Java custom instrumentation

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.

Reasons for memory exhaustion

The circuit breaker trips when it detects signs of memory exhaustion. This can happen for several reasons:

Troubleshooting

If the circuit breaker trips, try these troubleshooting tips.

For more help

Additional documentation resources include:

その他のヘルプ

さらに支援が必要な場合は、これらのサポートと学習リソースを確認してください:

問題を作成するこのページを編集する
Copyright © 2020 New Relic Inc.