You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Alexey Kukushkin <ku...@gmail.com> on 2017/11/28 14:30:21 UTC

Re: Ignite node crashes after one query fetches many entries from cache

Ignite Developers,

I know community is developing an "Internal Problems Detection" feature
<https://cwiki.apache.org/confluence/display/IGNITE/IEP-7%3A+Ignite+internal+problems+detection>.
Do you know if it addresses the problem Ray described below? May be we
already have a setting to prevent this from happening?

On Tue, Nov 28, 2017 at 5:13 PM, Ray <ra...@cisco.com> wrote:

> I try to fetch all the results of a table with billions of entries using
> sql
> like this "select * from table_name".
> As far as my understanding, Ignite will prepare all the data on the node
> running this query then return the results to the client.
> The problem is that after a while, the node crashes(probably because of
> long
> GC pause or running out of memory).
> Is node crashing the expected behavior?
> I mean it's unreasonable that Ignite node crashes after this kind of query.
>
> From my experience with other databases,  running this kind of full table
> scan will not crash the node.
>
> The optimal way for handling this kind of situation is Ignite node stays
> alive, the query will be stopped by Ignite node when the node find out it
> will run out of memory soon.
> Then an error response shall be returned to the client.
>
> Please advice me if this mechanism already exists and there is hidden
> switch
> to turn it on.
> Thanks
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>



-- 
Best regards,
Alexey

Re: Ignite node crashes after one query fetches many entries from cache

Posted by Nick Pordash <ni...@gmail.com>.
Ray,

I think to avoid excessive GC and OOM you could try switching to a lazy
result set:
https://apacheignite-sql.readme.io/docs/performance-and-debugging#result-set-lazy-load

- Nick

On Wed, Nov 29, 2017, 7:19 AM Anton Vinogradov <av...@gridgain.com>
wrote:

> Ray,
>
> Seems you're looking
> for org.apache.ignite.cache.query.SqlFieldsQuery#timeout?
>
> On Tue, Nov 28, 2017 at 5:30 PM, Alexey Kukushkin <
> kukushkinalexey@gmail.com> wrote:
>
>> Ignite Developers,
>>
>> I know community is developing an "Internal Problems Detection" feature
>> <https://cwiki.apache.org/confluence/display/IGNITE/IEP-7%3A+Ignite+internal+problems+detection>.
>> Do you know if it addresses the problem Ray described below? May be we
>> already have a setting to prevent this from happening?
>>
>> On Tue, Nov 28, 2017 at 5:13 PM, Ray <ra...@cisco.com> wrote:
>>
>>> I try to fetch all the results of a table with billions of entries using
>>> sql
>>> like this "select * from table_name".
>>> As far as my understanding, Ignite will prepare all the data on the node
>>> running this query then return the results to the client.
>>> The problem is that after a while, the node crashes(probably because of
>>> long
>>> GC pause or running out of memory).
>>> Is node crashing the expected behavior?
>>> I mean it's unreasonable that Ignite node crashes after this kind of
>>> query.
>>>
>>> From my experience with other databases,  running this kind of full table
>>> scan will not crash the node.
>>>
>>> The optimal way for handling this kind of situation is Ignite node stays
>>> alive, the query will be stopped by Ignite node when the node find out it
>>> will run out of memory soon.
>>> Then an error response shall be returned to the client.
>>>
>>> Please advice me if this mechanism already exists and there is hidden
>>> switch
>>> to turn it on.
>>> Thanks
>>>
>>>
>>>
>>> --
>>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>>
>>
>>
>>
>> --
>> Best regards,
>> Alexey
>>
>
>

Re: Ignite node crashes after one query fetches many entries from cache

Posted by Nick Pordash <ni...@gmail.com>.
Ray,

I think to avoid excessive GC and OOM you could try switching to a lazy
result set:
https://apacheignite-sql.readme.io/docs/performance-and-debugging#result-set-lazy-load

- Nick

On Wed, Nov 29, 2017, 7:19 AM Anton Vinogradov <av...@gridgain.com>
wrote:

> Ray,
>
> Seems you're looking
> for org.apache.ignite.cache.query.SqlFieldsQuery#timeout?
>
> On Tue, Nov 28, 2017 at 5:30 PM, Alexey Kukushkin <
> kukushkinalexey@gmail.com> wrote:
>
>> Ignite Developers,
>>
>> I know community is developing an "Internal Problems Detection" feature
>> <https://cwiki.apache.org/confluence/display/IGNITE/IEP-7%3A+Ignite+internal+problems+detection>.
>> Do you know if it addresses the problem Ray described below? May be we
>> already have a setting to prevent this from happening?
>>
>> On Tue, Nov 28, 2017 at 5:13 PM, Ray <ra...@cisco.com> wrote:
>>
>>> I try to fetch all the results of a table with billions of entries using
>>> sql
>>> like this "select * from table_name".
>>> As far as my understanding, Ignite will prepare all the data on the node
>>> running this query then return the results to the client.
>>> The problem is that after a while, the node crashes(probably because of
>>> long
>>> GC pause or running out of memory).
>>> Is node crashing the expected behavior?
>>> I mean it's unreasonable that Ignite node crashes after this kind of
>>> query.
>>>
>>> From my experience with other databases,  running this kind of full table
>>> scan will not crash the node.
>>>
>>> The optimal way for handling this kind of situation is Ignite node stays
>>> alive, the query will be stopped by Ignite node when the node find out it
>>> will run out of memory soon.
>>> Then an error response shall be returned to the client.
>>>
>>> Please advice me if this mechanism already exists and there is hidden
>>> switch
>>> to turn it on.
>>> Thanks
>>>
>>>
>>>
>>> --
>>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>>
>>
>>
>>
>> --
>> Best regards,
>> Alexey
>>
>
>

Re: Ignite node crashes after one query fetches many entries from cache

Posted by Igor Sapego <is...@apache.org>.
Ray,

In upcoming version you can do it a standard way for ODBC -
using SQL_ATTR_QUERY_TIMEOUT.

It will only be available starting with version 2.4 though [1], but
it is already in master and you can try it out using nightly
build [2] or if you are willing to build driver by yourself from the
master.

[1] - https://issues.apache.org/jira/browse/IGNITE-6836
[2] -
https://builds.apache.org/view/H-L/view/Ignite/job/Ignite-nightly/lastSuccessfulBuild/

Best Regards,
Igor

On Thu, Nov 30, 2017 at 4:55 PM, Ray <ra...@cisco.com> wrote:

> Anton, thanks for the heads up.
> Any idea on how to set the timeout if I'm using ODBC to do the query?
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: Ignite node crashes after one query fetches many entries from cache

Posted by Ray <ra...@cisco.com>.
Anton, thanks for the heads up.
Any idea on how to set the timeout if I'm using ODBC to do the query?




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Ignite node crashes after one query fetches many entries from cache

Posted by Anton Vinogradov <av...@gridgain.com>.
Ray,

Seems you're looking
for org.apache.ignite.cache.query.SqlFieldsQuery#timeout?

On Tue, Nov 28, 2017 at 5:30 PM, Alexey Kukushkin <kukushkinalexey@gmail.com
> wrote:

> Ignite Developers,
>
> I know community is developing an "Internal Problems Detection" feature
> <https://cwiki.apache.org/confluence/display/IGNITE/IEP-7%3A+Ignite+internal+problems+detection>.
> Do you know if it addresses the problem Ray described below? May be we
> already have a setting to prevent this from happening?
>
> On Tue, Nov 28, 2017 at 5:13 PM, Ray <ra...@cisco.com> wrote:
>
>> I try to fetch all the results of a table with billions of entries using
>> sql
>> like this "select * from table_name".
>> As far as my understanding, Ignite will prepare all the data on the node
>> running this query then return the results to the client.
>> The problem is that after a while, the node crashes(probably because of
>> long
>> GC pause or running out of memory).
>> Is node crashing the expected behavior?
>> I mean it's unreasonable that Ignite node crashes after this kind of
>> query.
>>
>> From my experience with other databases,  running this kind of full table
>> scan will not crash the node.
>>
>> The optimal way for handling this kind of situation is Ignite node stays
>> alive, the query will be stopped by Ignite node when the node find out it
>> will run out of memory soon.
>> Then an error response shall be returned to the client.
>>
>> Please advice me if this mechanism already exists and there is hidden
>> switch
>> to turn it on.
>> Thanks
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>
>
>
>
> --
> Best regards,
> Alexey
>

Re: Ignite node crashes after one query fetches many entries from cache

Posted by Anton Vinogradov <av...@gridgain.com>.
Ray,

Seems you're looking
for org.apache.ignite.cache.query.SqlFieldsQuery#timeout?

On Tue, Nov 28, 2017 at 5:30 PM, Alexey Kukushkin <kukushkinalexey@gmail.com
> wrote:

> Ignite Developers,
>
> I know community is developing an "Internal Problems Detection" feature
> <https://cwiki.apache.org/confluence/display/IGNITE/IEP-7%3A+Ignite+internal+problems+detection>.
> Do you know if it addresses the problem Ray described below? May be we
> already have a setting to prevent this from happening?
>
> On Tue, Nov 28, 2017 at 5:13 PM, Ray <ra...@cisco.com> wrote:
>
>> I try to fetch all the results of a table with billions of entries using
>> sql
>> like this "select * from table_name".
>> As far as my understanding, Ignite will prepare all the data on the node
>> running this query then return the results to the client.
>> The problem is that after a while, the node crashes(probably because of
>> long
>> GC pause or running out of memory).
>> Is node crashing the expected behavior?
>> I mean it's unreasonable that Ignite node crashes after this kind of
>> query.
>>
>> From my experience with other databases,  running this kind of full table
>> scan will not crash the node.
>>
>> The optimal way for handling this kind of situation is Ignite node stays
>> alive, the query will be stopped by Ignite node when the node find out it
>> will run out of memory soon.
>> Then an error response shall be returned to the client.
>>
>> Please advice me if this mechanism already exists and there is hidden
>> switch
>> to turn it on.
>> Thanks
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>
>
>
>
> --
> Best regards,
> Alexey
>