我曾尝试在同时进行大约200个请求的压力测试时捕获异常,并且如果正常使用不会出现此异常。我已经用谷歌搜索了这个错误,但是没有太多帮助,有人可以帮助我吗? 1)这是什么例外? 2)这是什么原因造成的? 3)关于如何解决它的任何建议?
代码是
public T Get(FilterDefinition<T> predicate)
{
_collection = _databases.GetCollection<T>(typeof(T).Name);
return _collection.Find(predicate).FirstOrDefault();
}
例外是
at MongoDB.Driver.Core.ConnectionPools.ExclusiveConnectionPool.AcquireConnectionHelper.CheckingOutConnection()
at MongoDB.Driver.Core.ConnectionPools.ExclusiveConnectionPool.AcquireConnection(CancellationToken cancellationToken)
at MongoDB.Driver.Core.Servers.Server.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.FindOperation`1.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](IClientSessionHandle session, IReadOperation`1 operation, ReadPreference readPreference, CancellationToken cancellationToken)
at MongoDB.Driver.MongoCollectionImpl`1.ExecuteReadOperation[TResult](IClientSessionHandle session, IReadOperation`1 operation, CancellationToken cancellationToken)
at MongoDB.Driver.MongoCollectionImpl`1.FindSync[TProjection](IClientSessionHandle session, FilterDefinition`1 filter, FindOptions`2 options, CancellationToken cancellationToken)
at MongoDB.Driver.MongoCollectionImpl`1.UsingImplicitSession[TResult](Func`2 func, CancellationToken cancellationToken)
at MongoDB.Driver.MongoCollectionImpl`1.FindSync[TProjection](FilterDefinition`1 filter, FindOptions`2 options, CancellationToken cancellationToken)
at MongoDB.Driver.FindFluent`2.ToCursor(CancellationToken cancellationToken)
at MongoDB.Driver.IAsyncCursorSourceExtensions.FirstOrDefault[TDocument](IAsyncCursorSource`1 source, CancellationToken cancellationToken)
at MongoDB.Driver.IFindFluentExtensions.FirstOrDefault[TDocument,TProjection](IFindFluent`2 find, CancellationToken cancellationToken)
at Repository.BaseRespository`1.Get(FilterDefinition`1 predicate) in /opt/ame_api/AMEQKUNAPI/Repository/BaseRespository.cs:line 57
at BLL.Service.BaseService.GetTblChannelByPrefix(String prefix, IRepository`1 repository) in /opt/ame_api/AMEQKUNAPI/BLL/Service/BaseService.cs:line 54
at BLL.Service.SingleWallet.AllBet.AllBetVerifyTokenService.AllBetVerifyTokenService.VerifyTokenResponse(AllBetVerifyTokenRequest request) in /opt/ame_api/AMEQKUNAPI/BLL/Service/SingleWallet/AllBet/AllBetVerifyTokenService/AllBetVerifyTokenService.cs:line 31
at Controllers.API.AllBetSingleWalletController.VerifyToken(AllBetVerifyTokenRequest request) in /opt/ame_api/AMEQKUNAPI/Controllers/API/SingleWalletController/AllBet/AllBetSingleWalletController.cs:line 47
at BLL.Service.SingleWallet.AllBet.AllBetVerifyTokenService.AllBetVerifyTokenService.GetTblPlayerAsync(String prefix, String playerName, GameType gameType) in /opt/ame_api/AMEQKUNAPI/BLL/Service/SingleWallet/AllBet/AllBetVerifyTokenService/AllBetVerifyTokenService.cs:line 52
at BLL.Service.SingleWallet.AllBet.AllBetVerifyTokenService.AllBetVerifyTokenService.VerifyTokenResponseAsync(AllBetVerifyTokenRequest request) in /opt/ame_api/AMEQKUNAPI/BLL/Service/SingleWallet/AllBet/AllBetVerifyTokenService/AllBetVerifyTokenService.cs:line 29