Using TRACE_LEVE_FILE=0 only affects the {databaseName}.trace.db , I suggest not using disable tracing. The {databaseName}.trace.db contains human error messages and warnings and should usually be empty. If it is not empty, you may have a bug in your application.
The most common cause of growing database files is uncommitted transactions. Have you completed all transactions? With the latest version of H2 (1.3.168), the message "Transaction log cannot be truncated" is written to the {databaseName}.trace.db . But this requires that you do not use TRACE_LEVE_FILE=0 .
Note that the empty space in the file is reused, but the file is not compressed when the database is open.
Thomas mueller
source share