[CSHARP-1862] System.AggregateException: An exception occurred while opening a connection to the server. Created: 05/Dec/16 Updated: 03/Dec/20 Resolved: 03/Dec/20 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Connectivity |
| Affects Version/s: | 2.3 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Sagar Thakur | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | question | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Mongodb 3.0.6 running on localhost, Win 7 ultimate 64bit |
||
| Description |
|
I am running a lot of operations in parallel which are trying to access the database. I get this error on one of the UpdateOneAsync() operations(this is not always the same, I get this exception on other functions as well). System.AggregateException: {"An exception occurred while opening a connection to the server."}StackTrace: at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) The InnerException has more info: ConnectionId: {{ ServerId : { ClusterId : 1, EndPoint : "Unspecified/localhost:27017" }, LocalValue : 163 }} InnerException: {"Timed out connecting to Unspecified/localhost:27017. Timeout was 00:00:30."}Message: An exception occurred while opening a connection to the server. Source: MongoDB.Driver.Core StackTrace: at MongoDB.Driver.Core.Connections.BinaryConnection.<OpenHelperAsync>d__48.MoveNext() I have tried changing the connectionpoolsize, waitqueuemultiple, waitqueuesize, maxidletimems and also making the MongoContext as a static variable. All that does not seem to help. I even tried to downgrade to 2.2 and 2.1 versions of the driver and also upgraded it to 2.4 but nothing seems to fix that issue. |
| Comments |
| Comment by Jeffrey Yemin [ 03/Dec/20 ] |
|
Apologies for not answering on this ticket immediately. Issues like this are almost always related to connectivity issues outside of the control of the driver, not a driver bug. For anyone else experiencing issues like this, here are some resources to get questions answered more quickly:
Thank you! |