If you just changed the HSQLDB version and it started to give memory problems, then this is a memory leak error.
Switch to HSQLDB version 2.3.1 , because after 2.0 errors were fixed regarding memory leaks, see the list of changes from 2.0 here , one of the error fixes says:
fixed issue causing slow speed and memory leak with disk result sets
Reduce memory consumption with HSQLDB:
Creating tables using this syntax will accurately reduce memory consumption, since such tables exist on disk, and only part of them are loaded into memory:
CREATE CACHED TABLE YOUR_TABLE_NAME
Confirm HSQLDB problem:
You can always use a memory profile to confirm the cause of high memory consumption using Visual VM . This is a tool that is already installed with the JDK and can be run through the command line using the jvisualvm .
Check out the 6-minute instructional video to find out how it can help fix memory problems.
source share