After .NET 6 upgrade => "The connection pool is in paused state for server"

After upgrading all of our AWS Lambda functions from NET 3.1 → NET 6 this error started to throw randomly.

Have tried to increase, but no success.
image

Any tips on how to solve?

MongoDB.Driver.MongoConnectionPoolPausedException: The connection pool is in paused state for server storage-1-m30-shard-00-02.ycfdm.mongodb.net:27017. at MongoDB.Driver.Core.ConnectionPools.ExclusiveConnectionPool.PoolState.ThrowIfNotReady() at MongoDB.Driver.Core.ConnectionPools.ExclusiveConnectionPool.AcquireConnectionHelper.StartCheckingOut() at MongoDB.Driver.Core.ConnectionPools.ExclusiveConnectionPool.AcquireConnectionHelper.AcquireConnectionAsync(CancellationToken cancellationToken) at MongoDB.Driver.Core.ConnectionPools.ExclusiveConnectionPool.AcquireConnectionAsync(CancellationToken cancellationToken) at MongoDB.Driver.Core.Servers.Server.GetChannelAsync(CancellationToken cancellationToken) at MongoDB.Driver.Core.Operations.AsyncCursor1.GetNextBatchAsync(CancellationToken cancellationToken)
at MongoDB.Driver.Core.Operations.AsyncCursor1.MoveNextAsync(CancellationToken cancellationToken) at MongoDB.Driver.IAsyncCursorExtensions.ToListAsync[TDocument](IAsyncCursor1 source, CancellationToken cancellationToken)
at MongoDB.Driver.IAsyncCursorSourceExtensions.ToListAsync[TDocument](IAsyncCursorSource1 source, CancellationToken cancellationToken) at Eton.Functions.DisplayIndexer.Stores.RawDataStore.GetAllCategories() in /home/vsts/work/1/s/Eton.Functions.DisplayIndexer/Stores/RawDataStore.cs:line 33

1 Like

Hello @Viktor_Nilsson , thanks for your report.
This error means that for some reason your connection pool is in unhealthy state.
To investigate it further, I would recommend creating a jira ticket in CSHARP project and do the following:

  1. Configure SDAM event subscriber as described here
  2. Provide captured events together with approximate time when the mentioned error has been triggered.
1 Like