Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-2300

Problem with high rise of connection

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None

      Driver version: 2.5.0
      Mongodb version: 3.6.3
      Driver settings: default
      System: Linux
      Framework: AspNet Core 2.0

      On our servers we see strange behavior of csharp diriver.
      The number of connection from csharp driver increases in not controlled manner.

      See peaks from image: 

      While peak ocurs the application that uses csharp-driver is failing with exceptions like:

      System.OperationCanceledException: The operation was canceled.
         at System.Threading.CancellationToken.ThrowOperationCanceledException()
         at MongoDB.Driver.Core.Connections.BinaryConnection.ReceiveMessageHelper.DecodeMessage(IByteBuffer buffer, IMessageEncoderSelector encoderSelector, CancellationToken cancellationToken)
         at MongoDB.Driver.Core.Connections.BinaryConnection.<ReceiveMessageAsync>d__54.MoveNext()
      
      System.Threading.Tasks.TaskCanceledException: A task was canceled.
         at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         at MongoDB.Driver.Core.ConnectionPools.ExclusiveConnectionPool.<AcquireConnectionAsync>d__35.MoveNext()
      

      We do not notice any trafic change in application during peaks in connection number, and also peaks are not related with number of reads/writes in application(It is constant per request).

      Is there any mechanism in driver itself that would explain this behavior?
      Could you explain us why we are getting those peaks?
      Could you advise what can we do to eliminate this behaviour?

            Assignee:
            Unassigned Unassigned
            Reporter:
            Wartalski Rafa? [X]
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: