I noticed that OpenBucket() call in my application has very slow response, it would take from a few seconds to dozens of seconds for OpenBucket() call to return. The following are highlights of my environment:
- Couchbase 5.0.1 Community on Windows server 2008 R2
- Couchbase.NetClient 2.5.9 on Windows 7
- Memcached bucket. I cut down to just one node in the cluster and the slowness still exists.
The code that sets up connection to the bucket:
var config = new ClientConfiguration
{
Servers = servers.Select(p => new Uri($"http://{p.Host}:{(p.PortSpecified ? p.Port : 8091)}")).ToList(),
ConfigPollEnabled = false,
VBucketRetrySleepTime = 200,
BucketConfigs = new Dictionary<string, BucketConfiguration>
{
{
cacheElement.BucketName, new BucketConfiguration
{
Username = cacheElement.UserName,
Password = cacheElement.Password,
BucketName = cacheElement.BucketName,
PoolConfiguration = new PoolConfiguration
{
MaxSize = 10,
MinSize = 2
}
}
}
}
};
_cluster = new Cluster(config);
_bucket = _cluster.OpenBucket(_bucketName);
In one test to took more than 25 seconds for OpenBucket to return:
[07/09/2018 16:32:24.950573] CouchbaseCache: OpenBucket…
[07/09/2018 16:32:50.657143] CouchbaseCache: OpenBucket done.
I have packet capture which shows shows lots of packets exchanged on port 11210. I’ll upload the file once I am allowed to upload.