33

I have the following test code:

def loop_bucket_gets
    bucket = Couchbase::Bucket.new({:node_list => ['xxx.xxx.xxx.xxx:8091', 'yyy.yyy.yyy.yyy:8091'],
                                    :bucket => 'Foo',
                                    :pool => 'default',
                                    :expires_in => 1.day,
                                    :default_format => :marshal,
                                    :key_prefix => '_foo'
                                   })

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

When I execute this in the Rails console the memory leaks.

I'm using:

  • couchbase 1.3.10 gem
  • libcouchbase 2.4.3

I created an issue at https://www.couchbase.com/issues/browse/RCBC-187

4

1 Answer 1

-9

This loop will go for infinite time. You should pass a breaking condition.

1
  • 2
    This does not answer the question. The user wants to have an implementation of fixing the memory leak. How would you approach the current code? Sep 30, 2019 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.