GC Troubles
So i have a memory leak in a console app which I'm trying to diagnose the cause of and i came across this from analysing a dotnet-gcdump.
My question, If "Inclusive Size" is the size of the object and all of its sub objects, how can this equal to 18 Exabytes when the machine its on does not have that kind of resources available to it?
When inspecting the root, it seems like it may self refence, would this be the cause and the number shown is in fact illusive?
Since a
unsigned long long
max value is also 18 Exabytes? and it simply stopped once it couldn't get a number high enough?
(I'm 100% a rookie when it comes to GC stuff)4 Replies
I would imagine it's a combination of this being self-referential and it also being a lazily-enumerated enumerable ('TakeUntilPredicate')
in the same way you can easily construct a normal IEnumerable which is infinitely long
i'm also a GC noob though so don't take this as authoritative
i'm guessing you have a .Take() call somewhere on this graphql object?
That lib is an external lib
https://github.com/graphql-dotnet/graphql-client/tree/v5.1.1
for which i have no control over.
It appears as though the
TakeUntilPredicateObserver
is from the System.Reactive
namespace.
We use a method on the GraphQL client to create an IObservable
which is invoked for each incoming message.
We using this GraphQL lib because:
- We have no control over the server, we are simply a client.
- Server operators have requested we make 1 websocket connection per customer for load balancing reasons.
- We have > 1000 clients
- I cannot find any other library that suites these requirements (Since all the libs I'm aware of all implement as a Singleton)
(although we have been able to implement an interface from StrawberryShake that can offer similar results, but are not quite sure if we should jump ship yet)GitHub
GitHub - graphql-dotnet/graphql-client at v5.1.1
A GraphQL Client for .NET Standard. Contribute to graphql-dotnet/graphql-client development by creating an account on GitHub.
unfortunately i've never used graphql directly, so i don't know enough to say if you're doing anything wrong here - apologies
No probs, thanks for your input, i appreciate it!