rethinkdbdash icon indicating copy to clipboard operation
rethinkdbdash copied to clipboard

High memory usage when using streams + changefeeds

Open marshall007 opened this issue 8 years ago • 1 comments

We have a CLI task for keeping a redis cache populated from RethinkDB. It has a --watch argument which, when true, appends .changes({ includeInitial: true })('new_val') to each query used to rebuild the cache.

The code and queries being executed are otherwise identical, but running with --watch results in ~3x the memory consumption.

./bin/cache          130MB
./bin/cache --watch  330MB

I think this may be related to #263... perhaps the fix mentioned there (https://github.com/neumino/rethinkdbdash/commit/c323d4958383be41e16f525cc5cac061a4c9ef29) was not ported over to the stream handling code?

marshall007 avatar Sep 15 '17 01:09 marshall007

Do you have a script where this happen? Does cache just has a single query with changes({ includeInitial: true })?

neumino avatar Oct 30 '17 01:10 neumino