[CSHARP-1615] c# driver (2.2.3)- what is the connection pool size and how can i configure it. Created: 31/Mar/16  Updated: 05/Apr/19  Resolved: 22/Dec/16

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

Type: Task Priority: Minor - P4
Reporter: avi inbar Assignee: Unassigned
Resolution: Done Votes: 0
Labels: question
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

windows application running with the c# driver 2.2.3 with MongoDB 3.2 server running on linux



 Description   

c# driver (2.2.3)- what is the connection pool size and how can i configure it.
this question comes because we are working async with mongodb and performs many read and write operations and from time to time we get several timeouts.
A timeout occured after 30000ms selecting a server using CompositeServerSelector{ Selectors = ReadPreferenceServerSelector{ ReadPreference =

{ Mode = Primary, TagSets = [] }

}, LatencyLimitingServerSelector

{ AllowedLatencyRange = 00:00:00.0150000 }

}. Client view of cluster state is { ClusterId : "1", ConnectionMode : "Automatic", Type : "Unknown", State : "Disconnected", Servers : [{ ServerId: "

{ ClusterId : 1, EndPoint : "50.50.50.50:27017" }

", EndPoint: "50.50.50.50:27017", State: "Disconnected", Type: "Unknown", HeartbeatException: "MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server. ---> System.Runtime.InteropServices.SEHException: External component has thrown an exception. at MongoDB.Driver.Core.WireProtocol.CommandWireProtocol`1.<ExecuteAsync>d_11.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) at MongoDB.Driver.Core.WireProtocol.CommandWireProtocol`1.ExecuteAsync(IConnection connection, CancellationToken cancellationToken) at MongoDB.Driver.Core.Connections.ConnectionInitializer.<InitializeConnectionAsync>d1.MoveNext() — End of stack trace from previous location where exception was thrown — at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at MongoDB.Driver.Core.Connections.BinaryConnection.<OpenHelperAsync>d47.MoveNext() — End of inner exception stack trace — at MongoDB.Driver.Core.Connections.BinaryConnection.<OpenHelperAsync>d47.MoveNext() — End of stack trace from previous location where exception was thrown — at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MongoDB.Driver.Core.Servers.ClusterableServer.<HeartbeatAsync>d_42.MoveNext()" }] }.



 Comments   
Comment by Craig Wilson [ 01/Apr/16 ]

Ok. Well, since this is getting thrown outside the driver, you'll need to investigate below the stack. I'd suggest turning on network tracing and seeing what gets reported below the stack.

If you find anything, please let us know what you find.

Comment by avi inbar [ 31/Mar/16 ]

Hi Craig,

Thanks for the prompt response.
Sometimes it works fine and sometimes it doesn’t.
We have 2 mongoDB machines which raised the same error (one is with windows operating system and the other is linux and we use ssl connection with it).

Regards,
Avi

From: Craig Wilson (JIRA) jira@mongodb.org
Sent: Thursday, March 31, 2016 6:23 PM
To: Avi Inbar <Avi.Inbar@clicksoftware.com>
Subject: [MongoDB-JIRA] (CSHARP-1615) c# driver (2.2.3)- what is the connection pool size and how can i configure it.

[ https://jira.mongodb.org/browse/CSHARP-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=1221309#comment-1221309<https://jira.mongodb.org/browse/CSHARP-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=1221309#comment-1221309> ]

Craig Wilson commented on CSHARP-1615:
--------------------------------------

This doesn't appear to have anything to do with a connection pool. Why do you think it does?

SEHException appears to be getting thrown when opening a socket. This happens outside our codebase. By definition, SEHException hasn't been mapped to a .NET exception and so I don't have any idea what the cause of the exception is, other than it was thrown by an external component.

Did this use to work and no longer does? What changed on the machine?

----------------------
This message was sent from MongoDB's issue tracking system. To respond to this ticket, please login to https://jira.mongodb.org<https://jira.mongodb.org> using your JIRA or MMS credentials.

CONFIDENTIALITY NOTICE: This email may contain ClickSoftware confidential and privileged material for the sole use of the intended recipient(s).
Any review, use, distribution or disclosure by others is strictly prohibited. If you have received this communication in error,
please notify the sender immediately by email and delete the message and any file attachments from your computer.
Thank you.

Comment by Craig Wilson [ 31/Mar/16 ]

This doesn't appear to have anything to do with a connection pool. Why do you think it does?

SEHException appears to be getting thrown when opening a socket. This happens outside our codebase. By definition, SEHException hasn't been mapped to a .NET exception and so I don't have any idea what the cause of the exception is, other than it was thrown by an external component.

Did this use to work and no longer does? What changed on the machine?

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