Hi
I am having trouble with a memory leak. I use ruby 2.3 and the latest drivers, Cassandra 3.11, Linux 64-bit.
It is fairly easy to reproduce.
Querying any large table seems to eat a lot of memory in the size 10-20GB in some minutes. The memory taken corresponds with the number of rows that is in the result of the query.
The case can be reproduced easily, using the example from this page:
http://docs.datastax.com/en/developer/ruby-driver/3.2/ and a query which results in some milion rows, in my case 3-4 millon (each rows contains very little data, no blobs or lists). Watch memory usage grow using for example 'top'.
The problem seems to be that the driver keeps a copy of all the rows while iterating over them? I have tried all combinations of sync/async/prepared/nonprepared queries, but without luck.
This problem does not seem to appear while using the java-driver - in this case memory usage is small and constant.
Any clues would be so welcome!
Cheers,
Petter Egesund
-- reproduce --
future = session.execute_async('SELECT * FROM any_large_table')
future.on_success do |rows|
rows.each do |row|
end
end
future.join