[CSHARP-1646] TcpStreamFactory.ConfigureConnectedSocket Exception Created: 05/May/16 Updated: 08/Feb/23 Resolved: 11/Jan/18 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Connectivity |
| Affects Version/s: | 2.2.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | slolitor | Assignee: | Robert Stam |
| Resolution: | Cannot Reproduce | Votes: | 2 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
windows server 2008r2 |
||
| Issue Links: |
|
||||||||
| Description |
|
the stack trace is : |
| Comments |
| Comment by Robert Stam [ 11/Jan/18 ] | |||||||||||
|
This could be related to CSHARP-2011, in the sense that Connect might be returning without throwing an exception and yet the socket might end up in an invalid state (which could explain why subsequently attempting to set the ReceiveBufferSize fails). | |||||||||||
| Comment by Wouter De Keersmaecker [ 19/Sep/16 ] | |||||||||||
|
I have encountered the same exception multiple times. My application runs pretty much all day, but occasionally it crashes due to this error. Platform: Windows 7 64bit I use the following MongoClientSettings:
Perhaps the low MaxConnectionIdleTime is causing this? Stacktrace:
EDIT 2017: | |||||||||||
| Comment by Craig Wilson [ 06/May/16 ] | |||||||||||
|
I haven't heard of this before, particularly related to the driver. I'll need to do some research, but it feels that, other than setting the value, the driver isn't responsible here. | |||||||||||
| Comment by slolitor [ 06/May/16 ] | |||||||||||
|
HI Craig Wilson : socket.ReceiveBufferSize = _settings.ReceiveBufferSize; go on work and you will find it throws from here: internal void SetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName, int optionValue, bool silent) catch return; if (!silent && (success == SocketError.SocketError)) throw socketException; so finalily it turns out this method set socket options failed.so a socket exception throw out. it is very strange ,is the network unstabilize would cause this problem? | |||||||||||
| Comment by Craig Wilson [ 05/May/16 ] | |||||||||||
|
Hi slolitor, The translation simply says an invalid parameter was supplied. Here is the code line this points to; the ReceiveBufferSize. Our default is 65536. 1. Does this always happen, or is it sporadic? Thanks, |