You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by vkulichenko <va...@gmail.com> on 2016/08/02 21:03:50 UTC
Re: Failed to run reduce query locally
Hi David,
When you call getAll(), you fetch the whole result set to the client. If
you're doing 'select *' from a disctributed without any conditions, you will
very likely get an out of memory, because to execute such a query your
client needs to have capacity equal to the total capacity of all servers.
First of all, I would recommend to avoid such queries. You should always try
to minimize network traffic and sending the whole cache to the client is
obviously a bad idea from this standpoint.
Second of all, if the result set is still large, you'd better iterate
through the QueryCursor instead of calling getAll(). If you iterate, Ignite
will fetch data in pages, discarding old ones. So the client will have only
one page at a time in memory and will not fail.
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Failed-to-run-reduce-query-locally-tp6667p6678.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Failed to run reduce query locally
Posted by vkulichenko <va...@gmail.com>.
Hi David,
Are you sure you need to fetch all 10M entries to a single client? This is
something that you should always avoid in a distributed system, even if the
client is capable to have this data in memory. What's your use case?
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Failed-to-run-reduce-query-locally-tp6667p6823.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Failed to run reduce query locally
Posted by "david.alexanyan" <da...@optym.com>.
In some case the error is "Query was cancelled, client node disconnected".
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Failed-to-run-reduce-query-locally-tp6667p6699.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Failed to run reduce query locally
Posted by "david.alexanyan" <da...@optym.com>.
Thanks very much for responce, however the client is capable to handle 10M
entries as this is ~2Gb of data.
In case of queries, even if I iterate over the results and count the number
of entries I get "Failed to reduce query locally" error: Here is the code:
var fieldsQuery = new GridGain.Cache.Query.SqlFieldsQuery(queryText);
int count = 0;
foreach (var item in igniteCache.QueryFields("SELECT Name FROM mytable ORDER
BY Name"))
count++;
I have tried various options to make it possible to query 10M entries,
however in all cases the query still fails on reduce step (used partitoned
cache over 3 nodes):
- tune up the JVM as described in help docs
- increase the max memory size of JVM (server & clinet processes)
- on heap storage/off heap storage
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Failed-to-run-reduce-query-locally-tp6667p6698.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.