[CSHARP-2631] Several MongoConnectionException's per hour in production backend logs Created: 11/Jun/19  Updated: 25/Jun/20  Resolved: 25/Jun/20

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

Type: Bug Priority: Major - P3
Reporter: Timofey Myagkikh Assignee: Wan Bachtiar
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Azure, VM Windows Server Datacenter 2019, Net Core Runtime 2.2.3.27414
MongoDB Atlas M30 ReplicaSet.


Attachments: PNG File wireshark.png    
Case:

 Description   

Hello!

In production backend logs I see permanent exceptions (around 10 per hour) like this:
https://pastebin.com/PFbdZUug

```
MongoDB.Driver.MongoConnectionException: An exception occurred while receiving a message from the server. MongoDB.Driver.MongoConnectionException: An exception occurred while receiving a message from the server.  System.IO.IOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.  System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond\r\n    End of inner exception stack trace 
```

If I correctly understood, for clients this exception looks like 500 http error.
In test environment, this error not reproduced.

In atlas replica set logs, nothing like MongoConnectionException's or any other connection problem.

Could you describe this behavior of mongodb C# driver and suggest a workaround for these situations?

If you need any metrics, I could share atlas monitoring charts or something else if you need it.



 Comments   
Comment by Rachelle Palmer [ 25/Jun/20 ]

Hi there, thank you for reaching out to MongoDB. As this sounds more like a support issue, I wanted to give you some resources to get this question answered more quickly:

  • our MongoDB support portal, located at support.mongodb.com
  • our MongoDB community forums, located here
  • If you are an Atlas customer, there is free support offered 24/7 in the lower right hand corner of the UI.

Thank you!
Rachelle

Comment by Timofey Myagkikh [ 13/Jun/19 ]

This is my wireshark dump.
Section with "Connection reset (RST)" looks like MongoConnectionException for each reset entries.
Is this expected behavior for mongo driver with win server or any workaround / special settings exist?

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