-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Labels
Description
Describe the bug
A clear and concise description of what the bug is.
A memory leak seems to be present.
using var session = _memgraphDriver.AsyncSession(conf => conf.WithDatabase("ABC"));
var cursor = await session.RunAsync(query);
var allRecords = await cursor.ToListAsync(); // Causes memory leak
await session.CloseAsync();
To Reproduce
Steps to reproduce the behavior:
- Add the following code with a query that returns a few thousand nodes
using var session = _memgraphDriver.AsyncSession(conf => conf.WithDatabase("ABC"));
var cursor = await session.RunAsync(query);
var allRecords = await cursor.ToListAsync(); // Causes memory leak
await session.CloseAsync();
// Optional - doesn't not affect memory leak await session.DisposeAsync();
// Optional - doesn't not affect memory leak await _memgraphDriver.DisposeAsync();
- Run the method several times inspecting the memory growth
Memory will continue to grow for each method call
Expected behavior
A clear and concise description of what you expected to happen.
Memory will quickly grow as in our query example it grows with 400 MB per method call.
Version Info (please complete the following information):
- .NET Version: .NET Core 8.0
- .NET Driver Version 5.28.3 (also tested earlier versions down to 5.27.0)
Additional context
Add any other context about the problem here.