Comments (9)
Hi @iamemilio @mirackara. We have come up with a reproducible example that we can share. What would be the preferred way to do so?
from go-agent.
@mirackara @iamemilio I have created this repo: https://github.com/betabandido/nrml
I've also added some instructions that hopefully will help. Please let me know if you have any doubts or questions.
from go-agent.
Hi @betabandido. Thanks for the profiling data and bringing this to our attention (especially the last couple of updates!). We will continue investigating this, but it may take a while to identify. If a reproducible example is possible, that would be greatly appreciated and will help us pinpoint the issue faster. We'll keep monitoring this thread in the meanwhile.
Thanks!
from go-agent.
Hi @betabandido. Before we flag this as a memory leak, we need to inform you that as a feature of the go agent, transactions are stored on logs until that transaction ends. Transactions that run for a long time will accumulate all sorts of memory, but logs happen to be very large. We do this this way because of sampling in the agent. The weight of a sampled transaction is not calculated until it is finished, so rather than risk dropping critical data, we hold onto it. All logs associated with a transaction are stored on board until that transaction ends. This is currently a design requirement of all agents.
from go-agent.
Thanks @iamemilio ! That makes sense. Yet, it seems we have none of the following:
- long-lasting transactions
- a continuously increasing number of transactions
Therefore, I would expect StoreLog
to consume a certain amount of memory, but not to increase its memory consumption over time.
I collected some data on how long the transactions for this particular app are with:
SELECT average(duration * 1000), percentile(duration * 1000, 99), max(duration * 1000)
FROM Transaction
WHERE appName = '<our app name>'
SINCE 7 days ago
This is what I got:
11.7 ms (avg)
78 ms (99th percentile)
3360 ms (max)
No really long-lasting transactions here.
For the number of transactions, I used:
SELECT count(*)
FROM Transaction
WHERE appName = '<our app name>'
SINCE 7 days ago
TIMESERIES 1 hour
and I got the following chart:
![image](https://private-user-images.githubusercontent.com/5481662/326542290-02bb5045-5308-44d5-bd2d-caaabc9bb41c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg5NjU0OTAsIm5iZiI6MTcxODk2NTE5MCwicGF0aCI6Ii81NDgxNjYyLzMyNjU0MjI5MC0wMmJiNTA0NS01MzA4LTQ0ZDUtYmQyZC1jYWFhYmM5YmI0MWMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYyMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MjFUMTAxOTUwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZjEyOGRlMWY1MmUxMTRkZmFjMzRhMjRhYzIwZDRkMDlmMDMxYzk3NDc1YmMzMjNiNzg3N2VhNDUxMTk2M2Q4OSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.YoOb58eSuMKuMyt_2z8kLfo--eiiDlIc1qfuKn4WjuQ)
There is a cyclic pattern, but I cannot see an ever-growing number of transactions between April 26th and 29th.
I acknowledge this might be a difficult issue to debug without a reproducible example. But, while we try to come up with one, please let us know how else we can help you gather more data to pinpoint the root cause.
from go-agent.
@iamemilio This morning I just got some more data with pprof. Memory consumption in StoreLog
went from ~80 MB to ~100 MB (see diagram below). Eventually the pods will get killed, and the process will start over again.
from go-agent.
Hi @betabandido. A public repository would be great if possible.
from go-agent.
If you would prefer not to share code publicly, then please get in touch with New Relic support and request assistance with the Go agent. An agent will handle your case and we will be able to communicate privately from there. That being said, the issue is already public, so as long as the reproducer is not sensitive to you, then we don't mind it being posted somewhere public, or just inline in this thread even.
from go-agent.
Hi @betabandido
First off, huge kudos to you + team. This reproducer is very detailed and will be a massive help for us. We don't have an ETA on this yet, but we are tracking this internally and will give the investigation the time it deserves. If we have any updates/questions we'll post them in this thread.
Thank You!
from go-agent.
Related Issues (20)
- Remove fasthttp dependency from main module HOT 2
- Update google.golang.org/grpc from 1.54.0 to 1.56.3 HOT 2
- transaction.go reqBody(req *http.Request) turn nil body into non Nil body for request.Body == http.NoBody HOT 1
- Add support to CopyFrom method in pgx integration HOT 1
- fmt.Stringer support for user attributes (especially for SQL query parameters)
- UNKNOWN log levels when using the native log package HOT 2
- `.Ignore()` not ignoring transaction (go-agent + nrgin) HOT 6
- Integration for gqlgen HOT 2
- nrpgx5 data-race HOT 5
- Changelog Go agent EOL Policy link is broken HOT 1
- agent with nrzap is not forwarding logs to newrelic HOT 3
- WrapBackgroundCore background logger is not sending logs to new relic but transaction logger is HOT 12
- zap logger.With log message properties are not sent to new relic HOT 4
- Attributes are not forwarded to NewRelic for logs HOT 16
- go agent , but not see span, please help me ,thanks HOT 3
- Specify service version during initial newrelic configuration HOT 6
- How to use AWS Lambda Web Adapter in golang app
- uber/zap WithField(...) not showing up in NR APM logs HOT 2
- potential bug in newAppRun HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-agent.