newrelic / newrelic/newrelic-java-agent
Decrease default timeout values for Tokens and Segments
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 240
- Forks
- 170
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 21
Description
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:
- token_timeout : default
180seconds - segment_timeout : default
600seconds
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by analyzing the Token and Segment APIs and their token_timeout and segment_timeout configuration values, using the linked Async API and configuration documentation as context. Determine evidence-based default values and assess whether changing them is a breaking change that requires a major release; done means both questions have a documented decision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100