Delete query results in application crash

classic Classic list List threaded Threaded
3 messages Options
ashishb888 ashishb888
Reply | Threaded
Open this post in threaded view
|

Delete query results in application crash

I am performing a delete query on a cache which has large data. When query
start application CPU utilization goes around 2000, and application crashes
with below error message,

2020-09-30 11:21:31.682 ERROR 128023 ---
[grid-nio-worker-tcp-comm-5-#68%TcpCommunicationSpi%] ROOT                                    
: JVM will be halted immediately due to the failure:
[failureCtx=FailureContext [type=CRITICAL_ERROR,
err=java.lang.OutOfMemoryError: GC overhead limit exceeded]]

*QUERY: DELETE FROM CACHE WHERE ID = ID;*


BR,
Ashish



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
stephendarlington stephendarlington
Reply | Threaded
Open this post in threaded view
|

Re: Delete query results in application crash

You ran out of Java heap-space, It’s more efficient to use the IgniteCache class for these kinds of operation. You can use IgniteCache#clear() to remove all records from a cache, for example.

> On 30 Sep 2020, at 12:05, ashishb888 <[hidden email]> wrote:
>
> I am performing a delete query on a cache which has large data. When query
> start application CPU utilization goes around 2000, and application crashes
> with below error message,
>
> 2020-09-30 11:21:31.682 ERROR 128023 ---
> [grid-nio-worker-tcp-comm-5-#68%TcpCommunicationSpi%] ROOT                                    
> : JVM will be halted immediately due to the failure:
> [failureCtx=FailureContext [type=CRITICAL_ERROR,
> err=java.lang.OutOfMemoryError: GC overhead limit exceeded]]
>
> *QUERY: DELETE FROM CACHE WHERE ID = ID;*
>
>
> BR,
> Ashish
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/


ilya.kasnacheev ilya.kasnacheev
Reply | Threaded
Open this post in threaded view
|

Re: Delete query results in application crash

In reply to this post by ashishb888
Hello!

SQL query intermediate results are held on heap. If you run out of heap, your application will crash.

There are three ways to mitigate it:
1) Use lazy=false parameter of Ignite JDBC or native SQL API. This will try to limit amount of results held on heap.
2) Rewrite your queries.
3) Wait for calcite-based engine, which will include memory rationing by SQL.

Regards,
--
Ilya Kasnacheev


ср, 30 сент. 2020 г. в 14:05, ashishb888 <[hidden email]>:
I am performing a delete query on a cache which has large data. When query
start application CPU utilization goes around 2000, and application crashes
with below error message,

2020-09-30 11:21:31.682 ERROR 128023 ---
[grid-nio-worker-tcp-comm-5-#68%TcpCommunicationSpi%] ROOT                                   
: JVM will be halted immediately due to the failure:
[failureCtx=FailureContext [type=CRITICAL_ERROR,
err=java.lang.OutOfMemoryError: GC overhead limit exceeded]]

*QUERY: DELETE FROM CACHE WHERE ID = ID;*


BR,
Ashish



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