[CSHARP-3106] MongoCommandException thrown for internal connection issue Created: 18/May/20 Updated: 27/Oct/23 Resolved: 18/May/20 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Command Operations |
| Affects Version/s: | 2.10.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Graeme Downes | Assignee: | Unassigned |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
I have intermittent issues running $search aggregate queries on Atlas Search beta. The error returned is a MongoCommandException, but based on the error description it looks like an issue connecting to the internal mongot server. Should this exception be a MongoConnectionException instead of a MongoCommandException?
Thanks, Graeme
|
| Comments |
| Comment by Graeme Downes [ 18/May/20 ] |
|
Thanks, Jeffrey. I understood the issue similarly; my question was more semantic. There should be some hint to the client of the driver that the issue is related to connectivity (regardless of if it's driver => server or server => server). I will definitely contact Atlas support, but that's no guarantee this issue won't happen again. I have retry logic built into my application to handle intermittent/transient connectivity errors which I would argue this classifies as one. Unless stated elsewhere in the docs, I would assume the command exception originates from issues with inputs I've provided, however, this particular issue is out of my control. Thanks for your consideration. |
| Comment by Jeffrey Yemin [ 18/May/20 ] |
|
I don't think so. Looking closely, the error message {{"Remote error from mongot :: caused by :: Error connecting to localhost:28000 (127.0.0.1:28000) :: caused by :: Connection refused." }} is actually coming the server, not the driver. So it appears that the connectivity issue is within Atlas, not with the driver to Atlas. If you continue to have this issue, I suggest you contact Atlas support through the usual channels. |