Couchbase::Bucket leaks memory

Hi all,

I have the following test code:

def loop_bucket_gets
    bucket ={:node_list => ['', 'yyy.yyy.yyy.yyy:8091'],
                                    :bucket => 'Foo',
                                    :pool => 'default',
                                    :expires_in =>,
                                    :default_format => :marshal,
                                    :key_prefix => '_foo'

    i = 0
    loop do
        i += 1
        bucket.get "ABC#{i}"
      rescue ::Couchbase::Error::Base => e

When I execute the method in the rails console, the memory leaks.

I’m using:

  • couchbase 1.3.10 gem
  • libcouchbase 2.4.3

Any ideas?

1 Like

Thanks, I’ve opened

I will try to reproduce and fix that soon

Thank you!

If it helps, I used valgrind and it showed a lot of “definitely lost” bytes with this code.
On the other hand, directly using the libcouchbase to “get” from cache, valgrind showed 0 lost bytes.
I think the problem is in the gem’s native extentions.

Thank you again for your time.

there are could be traces of Ruby VM, but I will take a look