[CSHARP-2300] Problem with high rise of connection Created: 18/Jun/18  Updated: 05/Apr/19  Resolved: 14/Jan/19

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Rafa? [X] Assignee: Unassigned
Resolution: Done Votes: 0
Labels: 2.5, question
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2018-06-18-16-19-11-810.png    

 Description   

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?



 Comments   
Comment by Jeffrey Yemin [ 14/Jan/19 ]

Sorry for the (very) late reply.

It sounds like your application is experiencing unexpected load, but from the information you provided there is no evidence that the driver itself is operating incorrectly.

Just to let you know this project is for .NET driver bugs or feature requests. The best place for questions regarding MongoDB usage or the .NET driver specifics is the mongodb-user mailinglist or stackoverflow as you will reach a broader audience there. If your business requires an answer from MongoDB within a time frame then we do offer production support.

If you do follow up via one of the options above please post a link and I will follow the conversation there.

Generated at Wed Feb 07 21:42:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.