couchbaselabs / Couchbase.Extensions

Extensions for Couchbase for .Net Core
Apache License 2.0
27 stars 14 forks source link

Timeouts when trying to set large (less than 20MB) object in the cache #69

Closed michael-giorgaras-cko closed 4 years ago

michael-giorgaras-cko commented 4 years ago

When trying to set a rather large (around 2MB) object in the cache I randomly get one of the two exeptions below:

System.Net.Sockets.SocketException (125): Operation canceled
  at Couchbase.IO.MultiplexingConnection.SendAsync(Byte[] request, Func`2 callback, ISpan span, ErrorMap errorMap)

or

System.Net.Sockets.SocketException (32): Broken pipe
  at Couchbase.IO.MultiplexingConnection.SendAsync(Byte[] request, Func`2 callback, ISpan span, ErrorMap errorMap)

followed by:

Couchbase.IO.RemoteHostClosedException: The remote host (<host_ip_here>:11210) has gracefully closed this connection

I am using Couchbase.Extensions.Caching 1.0.2 and couchbase enterprise server 6.0.1 with an ephemeral bucket for the cache. I have tried changing the set timeout like:

 opt.Buckets = new List<BucketDefinition>
                {
                    new BucketDefinition
                    {
                        Name = cacheSettings.CacheBucketName,
                        Password = cacheSettings.CouchbasePassword,
                        ConnectionPool = new ConnectionPoolDefinition
                        {
                            SendTimeout = 60000
                        }
                    }
                };

but the issue persists. Is there some other configuration I need to be changing for the set to work without timeouts?

Thanks