Description
Memory usage quickly builds up on querying many batches of keys, with bucket.get_multi() or by using any other ..._multi() functions, eg. upsert_mult().
You may test it with the following script:
from couchbase.bucket import Bucket |
import resource |
|
keys = [line.rstrip() for line in open('1000_keys.txt', 'rt')] |
bucket = Bucket('couchbase://hostname/a_bucket', username=..., password=...) |
|
for i in range(100): |
bucket.get_multi(keys)
|
mem_rss = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss
|
print('Memory usage: ', mem_rss) |
Libcouchbase 2.10.7 + couchbase 2.5.12 Python package does not have this issue, but 3.0.5 does have.