.Net 6 web API and Couchbase Server CE
I have a scopped business service and a singleton repository (couchbase server). When I try to insert a record I am getting the following error. When I change the service scope to Singleton it works without any issues? Any idea?
I hope the recommended approach for the scope of repository class is Singleton, right?. And I want to run the service scope as Scopped.
Couchbase.Core.Exceptions.UnambiguousTimeoutException
HResult=0x80131500
Message=The GetCidByName operation 55/ timed out after 00:00:02.7545219. It was retried 7 times using Couchbase.Core.Retry.BestEffortRetryStrategy.
Source=Couchbase.NetClient
StackTrace:
at Couchbase.Utils.ThrowHelper.ThrowTimeoutException(IOperation operation, Exception innerException, TypedRedactor redactor, IErrorContext context)
at Couchbase.Core.Retry.RetryOrchestrator.d__4.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Couchbase.KeyValue.CouchbaseCollection.d__60.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Couchbase.KeyValue.CouchbaseCollection.d__61.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Couchbase.KeyValue.CouchbaseCollection.d__59.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Couchbase.KeyValue.CouchbaseCollection.d__451.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult()
at DataAccess.Couchbase.CouchbaseServerRepository.d__14`1.MoveNext() in C:\Source\MTCU\Server\DataAccess.CouchbaseLite\CouchbaseServerRepository.cs:line 88
This exception was originally thrown at this call stack:
[External Code]
Inner Exception 1:
OperationCanceledException: Operation 55/ cancelled (Internal) after 2752.4435ms. (SocketNotAvailable,SocketNotAvailable,SocketNotAvailable,SocketNotAvailable,SocketNotAvailable,SocketNotAvailable,SocketNotAvailable)
Inner Exception 2:
SocketNotAvailableException: ChannelConnectionPool