cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Perroud <>
Subject Re: get_range_slice leads to java.lang.OutOfMemoryError?
Date Fri, 02 Apr 2010 14:16:57 GMT
A way to read all the db without having an OOM is to limit the amount
of rows to be returned, and to iterate over the query, the starting
key being the last returned key. Note that doing that way the first
key of the next iteration is the same as the last key of the preivous

The warning in SliceRange can also be applied for this function :
"How many columns to return. Similar to LIMIT 100 in SQL. May be
arbitrarily large, but Thrift will materialize the whole result into
memory before returning it to the client, so be aware that you may be
better served by iterating through slices by passing the last value of
one call in as the start of the next instead of increasing count
arbitrarily large."

Kind regards,


2010/4/2 Gautam Singaraju <>:
> I call the get_range_slice method in Java to get the list of all keys
> in Cassandra db. The db is pretty small, about 1.3GB on disk. I
> received the following error on the server:
> "java.lang.OutOfMemoryError: Requested array size exceeds VM limit"
> I changed the JVM size from 1 GB to 2 GB in
> cassandra/bin/ But, the error still persists.
> Any help will be much appreciated.
> ---
> Gautam

View raw message