Regarding memoryleak in Subscription service. #1195
-
Howdy! Starting by thanking for an awesome package. :) I would like to ask about a memory leak found while using an earlier version of this package. The library structure has gone through major changes so it has probably being addressed already but could still be good to be aware. This leak was found in version 6.0.0, in file: src/Transports.Subscriptions.Abstractions/SubscriptionServer.cs
} As can be seen in the SubscriptionServer class the ActionBlock<OperationMessage>, _handler does not appear to call the Complete() method, which makes the block remain alive. Any new invocation of OnConnect() also creates a new _hander block by the LinkToTransportReader(). Indeed there are implementations for disposal of TransportReader and TransportWriter alas the _handler block does not seem to have any implementation for this. Multiple calls to OnConnect() has showed to accumulate memory usage most probably because of this. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The subscription implementation was rewritten from scratch for version 7. You should not encounter any memory leaks with the current version. It offers many other improvements also - see https://github.com/graphql-dotnet/server/blob/master/docs/migration/migration7.md When upgrading to v7, be sure to read the GraphQL.NET migration guides here:
While we are not pushing updates for v6, if you want to issue a PR against the |
Beta Was this translation helpful? Give feedback.
The subscription implementation was rewritten from scratch for version 7. You should not encounter any memory leaks with the current version. It offers many other improvements also - see https://github.com/graphql-dotnet/server/blob/master/docs/migration/migration7.md
When upgrading to v7, be sure to read the GraphQL.NET migration guides here:
While we are not pushing updates for v6, if you want to issue a PR against the
v6
branch, feel free to do so, and I can review how easy/difficult it would be to release an update.