With the complexity and prevalence of asynchronous code, the Java agent frequently encounters timeouts with the Token and Segment APIs, which belong to the agent's Async API. New Relic Transactions will stay alive until all Tokens and Segments have been ended. In cases where they don't end naturally, they will stay alive until timing out.
The current timeout values for these APIs is far too high:
Scenarios where throughput is extremely high and Token/Segment timeouts regularly occur can lead to excessive memory consumption that resembles a memory leak (though technically is not a leak).
We should run some analysis and determine more reasonable timeout defaults, which could have a great positive effect on memory consumption.
Questions to answer:
- What are reasonable default timeout values?
- Should decreasing these values be considered a breaking change and require a major release?
With the complexity and prevalence of asynchronous code, the Java agent frequently encounters timeouts with the
TokenandSegmentAPIs, which belong to the agent's Async API. New Relic Transactions will stay alive until allTokens andSegments have been ended. In cases where they don't end naturally, they will stay alive until timing out.The current timeout values for these APIs is far too high:
180seconds600secondsScenarios where throughput is extremely high and
Token/Segmenttimeouts regularly occur can lead to excessive memory consumption that resembles a memory leak (though technically is not a leak).We should run some analysis and determine more reasonable timeout defaults, which could have a great positive effect on memory consumption.
Questions to answer: