This topic explains how to set timeout values for long-running queries in VMware Tanzu GemFire.
Tanzu GemFire can monitor and throw an exception when a query runs longer than a configured amount of time. This feature can be enabled by setting the gemfire.Cache.MAX_QUERY_EXECUTION_TIME system property which detects that the JVM has too little heap memory.
The default query timeout is five hours. Set a different amount of time, in milliseconds, by specifying the system variable gemfire.Cache.MAX_QUERY_EXECUTION_TIME
. A value of -1
explicitly deactivates the timeout.
When enabled, a query that runs longer than the configured timeout will be canceled such that it does not finish, and GemFire throws a QueryExecutionTimeoutException
.