I got problem with Pentaho BI Community Version.


Java version "1.8.0_111"
Pentaho 6.1
PostgreSQL 9.4.10

I set JAVA memory on higest level as it can be on my environment: Xms4096m -Xmx30720m -XX:MaxPermSize=512m

Pentaho working fine.

Problem is:

When user create CDE Dashboard (using "SQL Queries" - it is important that he is using "SQL Queries". If he use "MDX Queries" i can manage connection by changing parameter in mondrian.properties)

and the QUERY is wrong (result is too big), tomcat using all RAM MEMORY on serwer, and Pentaho is crash.

In log: java.lang.OutOfMemoryError: Requested array size exceeds VM limit

And only way to fix Pentaho is restart it.

And the question is:

Is there any way, that i can set:

When SQL Query in CDE Dashboard "working" too long, or trying to get too many row in result (making all of the serwer memory FULL), stop the query and release it from memory?
It must be the global property, not only in one CDE Dashboard.
I want to protect serwer from "wrong" user SQL Query in CDE Dashboard