System.TimeoutException: A timeout occured after 30000ms selecting a server using CompositeServerSelector
<p>I have following application:</p>

<p><a href="http://i.stack.imgur.com/kG9Ih.jpg" rel="noreferrer">application deployment diagram</a></p>

<p>A - Application A is a .net wcf service hosted in IIS 7.5 using c# mongodriver 2.2.4 compiled in .net 4.5</p>

<p>B - Application B is a windows service application using mongodriver 1.11 compiled in .net 3.5</p>

<p>Both services are similar, service B is maintained for legacy systems and service A is under evolution.</p>

<p>Both applications are hosted in same servers. (Windows Standard 2008 R2)
This applications had been running for more than 1 year perfectly but since 24/June/2016 application A (WCF) began a strange behavior when opening a new connection to Mongo Server:</p>

<blockquote>
<pre><code>&gt; System.TimeoutException: A timeout occured after 30000ms selecting a
&gt; server using CompositeServerSelector{ Selectors =
&gt; ReadPreferenceServerSelector{ ReadPreference = { Mode = Primary,
&gt; TagSets = [] } }, LatencyLimitingServerSelector{ AllowedLatencyRange =
&gt; 00:00:00.0150000 } }. Client view of cluster state is { ClusterId :
&gt; "1", ConnectionMode : "ReplicaSet", Type : "ReplicaSet", State :
&gt; "Disconnected", Servers : [{ ServerId: "{ ClusterId : 1, EndPoint :
&gt; "Unspecified/mongodb-log-act01:27017" }", EndPoint:
&gt; "Unspecified/mongodb-log-act01:27017", State: "Disconnected", Type:
&gt; "Unknown" }] }.    at
&gt; MongoDB.Driver.Core.Clusters.Cluster.WaitForDescriptionChangedHelper.HandleCompletedTask(Task
&gt; completedTask)    at
&gt; MongoDB.Driver.Core.Clusters.Cluster.&lt;WaitForDescriptionChangedAsync&gt;d__44.MoveNext()
&gt; --- End of stack trace from previous location where exception was thrown ---    at
&gt; System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at
&gt; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
&gt; task)    at
&gt; MongoDB.Driver.Core.Clusters.Cluster.&lt;SelectServerAsync&gt;d__37.MoveNext()
&gt; --- End of stack trace from previous location where exception was thrown ---    at
&gt; System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at
&gt; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
&gt; task)    at
&gt; System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
&gt; at
&gt; MongoDB.Driver.Core.Bindings.ReadPreferenceBinding.&lt;GetReadChannelSourceAsync&gt;d__8.MoveNext()
&gt; --- End of stack trace from previous location where exception was thrown ---    at
&gt; System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at
&gt; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
&gt; task)    at
&gt; System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
&gt; at
&gt; MongoDB.Driver.Core.Operations.FindOperation`1.&lt;ExecuteAsync&gt;d__107.MoveNext()
&gt; --- End of stack trace from previous location where exception was thrown ---    at
&gt; System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at
&gt; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
&gt; task)    at
&gt; MongoDB.Driver.OperationExecutor.&lt;ExecuteReadOperationAsync&gt;d__1`1.MoveNext()
&gt; --- End of stack trace from previous location where exception was thrown ---    at
&gt; System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at
&gt; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
&gt; task)    at
&gt; MongoDB.Driver.MongoCollectionImpl`1.&lt;ExecuteReadOperationAsync&gt;d__59`1.MoveNext()
&gt; --- End of stack trace from previous location where exception was thrown ---    at
&gt; System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at
&gt; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
&gt; task)    at
&gt; System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
&gt; at
&gt; MongoDB.Driver.IAsyncCursorSourceExtensions.&lt;ToListAsync&gt;d__16`1.MoveNext()
&gt; --- End of stack trace from previous location where exception was thrown ---    at
&gt; System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at
&gt; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
&gt; task)    at
&gt; Liberty.LogService.Implementation.LogManagerService.&lt;Inicializar&gt;d__0.MoveNext()
</code></pre>
</blockquote>

<p>This error is not constant, happen sometimes with no reason. But service B keeps working and if a try to connect to mongo from my desktop I can do it, so how can mongo driver raise an exception related to connectivity problems if the server is totally accessible?</p>

<p>The last attempt was migrated to last driver version. When this problems starts I was using driver 2.0.1</p>

<p>I appreciate any help</p>