when i use SDK to do simple things followling the guide;in my c# development, it is a multi thread program,and run by cycle.At the beginning of running all goes well,but nearly after 7 or 10 minutes,it goes wrong with System.Runtime.Remoting.RemotingException,i have tried every method,but i can not do anything now,please help me!
-------------------------------------config↓
<couchbaseClients>
<couchbase useSsl="false" operationLifespan="3200" username="tony001" password="123456">
<servers>
<add uri="http://127.0.0.1:8091">
</add>
</servers>
<buckets>
<add name="cashlottery" useSsl="false" operationLifespan="3200">
<connectionPool name="cashlotteryPool" maxSize="10" minSize="5" waitTimeout="5000" shutdownTimeout="11000" sendTimeout="30000">
</connectionPool>
</add>
</buckets></couchbase></couchbaseClients>
----------------------------------------------------------------inite↓
public MyCoucheBase()
{
ClusterHelper.Initialize("couchbaseClients/couchbase");
}
------------------------------------------------------------method↓
public T GetCache<T>(string key, CouchBaseBuckets bucketType = CouchBaseBuckets.cashlottery)
{
IBucket bucket = ClusterHelper.GetBucket(bucketType.ToString());
try
{
var result = bucket.GetDocument<T>(key);
if (result.Success)
{
return result.Document.Content;
}
return default(T);
}
catch(RemotingException e)
{
ClusterHelper.RemoveBucket(bucketType.ToString());
bucket.Dispose();
return GetCache<T>(key, bucketType);
}
catch (Exception e)
{
if (bucket != null)
{
ClusterHelper.RemoveBucket(bucketType.ToString());
}
return default(T);
}
}
---------------------------------------------------------exeptions↓
System.Runtime.Remoting.RemotingException: object“/7198b36e_0d7c_4671_8af4_08296fde986b/fmmiypfup+cdh8bmkbetleer_33.rem”(has disconneted or not in server)已经断开连接或不在服务器上。
Server stack trace:
in System.Runtime.Remoting.Channels.ChannelServices.CheckDisconnectedOrCreateWellKnownObject(IMessage msg)
in System.Runtime.Remoting.Channels.ChannelServices.SyncDispatchMessage(IMessage msg)Exception rethrown at [0]:
在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
在 System.Runtime.Remoting.ObjectHandle.Unwrap()
在 OpenTracing.Util.AsyncLocalScopeManager.get_Active()
在 Couchbase.Tracing.ThresholdLoggingTracer.get_ActiveSpan()
在 Couchbase.Tracing.TracerExtensions.BuildSpan(ITracer tracer, IOperation operation, String operationName, String bucketName)
在 Couchbase.Core.Buckets.CouchbaseRequestExecuter.SendWithRetry[T](IOperation1 operation) 在 Couchbase.CouchbaseBucket.Upsert[T](String key, T value, UInt64 cas, UInt32 expiration, TimeSpan timeout) 在 Couchbase.CouchbaseBucket.Upsert[T](String key, T value, UInt64 cas, UInt32 expiration) 在 Couchbase.CouchbaseBucket.Upsert[T](IDocument
1 document)
在 CashPlatform.Core.Cache.MyCoucheBase.Upsert[T](String key, T content, Int32 expiry, CouchBaseBuckets bucketType)
who can help me please!!! important thing is sometimes it goes ok,sometimes goes wrong!