Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2944

Memory leak in Gremlin.Net driver if CancellationToken is used

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.6.2, 3.5.5, 3.6.3, 3.5.6
    • 3.7.0, 3.5.7, 3.6.4
    • dotnet
    • None

    Description

      We have noticed in my team at G DATA that a .NET service has been using an increasing amount of memory since we began to propagate the CancellationToken into the Gremlin.Net traversal executions which was introduced in TINKERPOP-2794.

      We could track this down with memory profiling to this place in the driver where we register a callback to execute when cancellation is requested. These registered callbacks are only cleaned up when the whole Connection object gets disposed. Since the callback contains a reference to the full RequestMessage of the traversal, it can contain a lot of data. This is something that I've completely overlooked when I added support for cancellation.

      The driver should clean up those callbacks when they are not needed any more because the request has been processed completely (either successfully or with an error).

      Attachments

        Activity

          People

            Florian Hockmann Florian Hockmann
            Florian Hockmann Florian Hockmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: