Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-1628

Unobserved task exception when connection times out

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • 2.2.2
    • 2.2.4
    • Connectivity
    • None
    • Fully Compatible

    Description

      When server connection times out, an unobserved task exception is thrown, even when synchronous API is used (see stack trace below).
      We have a handler for such exceptions installed globally (from the days when such exceptions terminated current AppDomain), so we occasionally get these traced when servers get down. While they are mostly harmless, I believe these exceptions should be handled and (probably) muted.

      at MongoDB.Driver.Core.Connections.BinaryConnection.OpenHelper(CancellationToken cancellationToken)
      at MongoDB.Driver.Core.Connections.BinaryConnection.Open(CancellationToken cancellationToken)
      at MongoDB.Driver.Core.ConnectionPools.ExclusiveConnectionPool.AcquiredConnection.Open(CancellationToken cancellationToken)
      at MongoDB.Driver.Core.Servers.ClusterableServer.GetChannel(CancellationToken cancellationToken)
      at MongoDB.Driver.Core.Bindings.ServerChannelSource.GetChannel(CancellationToken cancellationToken)
      at MongoDB.Driver.Core.Bindings.ChannelSourceHandle.GetChannel(CancellationToken cancellationToken)
      at MongoDB.Driver.Core.Operations.CountOperation.Execute(IReadBinding binding, CancellationToken cancellationToken)
      at MongoDB.Driver.OperationExecutor.ExecuteReadOperation[TResult](IReadBinding binding, IReadOperation`1 operation, CancellationToken cancellationToken)
      at MongoDB.Driver.MongoCollectionImpl`1.ExecuteReadOperation[TResult](IReadOperation`1 operation, ReadPreference readPreference, CancellationToken cancellationToken)
      at MongoDB.Driver.MongoCollectionImpl`1.ExecuteReadOperation[TResult](IReadOperation`1 operation, CancellationToken cancellationToken)
      at MongoDB.Driver.MongoCollectionImpl`1.Count(FilterDefinition`1 filter, CountOptions options, CancellationToken cancellationToken)

      Attachments

        Activity

          People

            craig.wilson@mongodb.com Craig Wilson
            onyxmaster Aristarkh Zagorodnikov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: