On 23 Nov 2025, at 08:59, Guy Levkowitz <sil...@gmail.com> wrote:HeyWe got below error:[2025-11-23T01:05:22.940+02:00] [DiskCache-Prune-1[Disk Cache Pruner (gerrit_file_diff-v2)]] INFO com.google.gerrit.server.cache.h2.H2CacheImpl : Cache jdbc:h2:file:///opt/gerrit/cache/gerrit_file_diff-v2 size (3.54g) is greater than maxSize (128.00m), pruning
[2025-11-23T01:05:25.185+02:00] [DiskCache-Prune-1[Disk Cache Pruner (gerrit_file_diff-v2)]] WARN com.google.gerrit.server.cache.h2.H2CacheImpl : Cannot prune cache jdbc:h2:file:///opt/gerrit/cache/gerrit_file_diff-v2
org.h2.jdbc.JdbcSQLTimeoutException: Timeout trying to lock table {0}; SQL statement:
DELETE FROM data WHERE k=? and version=? [50200-232]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:572)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:489)Also[2025-11-23T09:28:53.833+02:00] [HTTP GET /a/changes/?q=%28+commit%3A345e5ea204f7d9bb314157935450f742d3421a85+OR+commit%3A4afed833b1a4f167d2258b8dc5142be (SELF_REVIEW from 192.168.121.52)] WARN com.google.gerrit.server.cache.h2.H2CacheImpl : Cannot read cache jdbc:h2:file:///opt/gerrit/cache/gerrit_file_diff-v2 for FileDiffCacheKey{project=os_sed, oldCommit=commit 5129bfa498d62d2f7e35e3f4d24d93587456f2c3 0 -------, newCommit=AnyObjectId[4521173b650c2cac27f9bcf4d389e6f1227a31cb], newFilePath=module.conf, renameScore=60, diffAlgorithm=HISTOGRAM_WITH_FALLBACK_MYERS, whitespace=IGNORE_NONE, useTimeout=true} [CONTEXT TRACE_ID="1763882823320-d57d341b" request="REST /changes/" ]
org.h2.jdbc.JdbcSQLTimeoutException: Timeout trying to lock table "DATA"; SQL statement:
UPDATE data SET accessed=? WHERE k=? AND version=? [50200-232]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:572)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:489)
what should we redefine in the gerrit.config file ?
BRGuy--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/285c6849-c720-4926-82fc-c9fa864c4543n%40googlegroups.com.
On 23 Nov 2025, at 09:54, Luca Milanesio <luca.mi...@gmail.com> wrote:Hi Guy,On 23 Nov 2025, at 08:59, Guy Levkowitz <sil...@gmail.com> wrote:HeyWe got below error:[2025-11-23T01:05:22.940+02:00] [DiskCache-Prune-1[Disk Cache Pruner (gerrit_file_diff-v2)]] INFO com.google.gerrit.server.cache.h2.H2CacheImpl : Cache jdbc:h2:file:///opt/gerrit/cache/gerrit_file_diff-v2 size (3.54g) is greater than maxSize (128.00m), pruningThe answer to your question is in the above line: "Cache jdbc:h2:file:///opt/gerrit/cache/gerrit_file_diff-v2 size (3.54g)”3.54GBytes looks quite big and the configured maxSize is 128MBytes, therefore I’m surprised that Gerrit is actually still alive whilst trying to perform the pruning, which also failed.Either you are OK to live with the it, and then accept that Gerrit is unresponsive during the pruning, or increase the max size of the cache on the gerrit.config.See the caches configuration settings at [1].A better solution would be using a more resilient and scalable persistent cache, like cache-chronicle map [2].
[2025-11-23T01:05:25.185+02:00] [DiskCache-Prune-1[Disk Cache Pruner (gerrit_file_diff-v2)]] WARN com.google.gerrit.server.cache.h2.H2CacheImpl : Cannot prune cache jdbc:h2:file:///opt/gerrit/cache/gerrit_file_diff-v2
org.h2.jdbc.JdbcSQLTimeoutException: Timeout trying to lock table {0}; SQL statement:
DELETE FROM data WHERE k=? and version=? [50200-232]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:572)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:489)Also[2025-11-23T09:28:53.833+02:00] [HTTP GET /a/changes/?q=%28+commit%3A345e5ea204f7d9bb314157935450f742d3421a85+OR+commit%3A4afed833b1a4f167d2258b8dc5142be (SELF_REVIEW from 192.168.121.52)] WARN com.google.gerrit.server.cache.h2.H2CacheImpl : Cannot read cache jdbc:h2:file:///opt/gerrit/cache/gerrit_file_diff-v2 for FileDiffCacheKey{project=os_sed, oldCommit=commit 5129bfa498d62d2f7e35e3f4d24d93587456f2c3 0 -------, newCommit=AnyObjectId[4521173b650c2cac27f9bcf4d389e6f1227a31cb], newFilePath=module.conf, renameScore=60, diffAlgorithm=HISTOGRAM_WITH_FALLBACK_MYERS, whitespace=IGNORE_NONE, useTimeout=true} [CONTEXT TRACE_ID="1763882823320-d57d341b" request="REST /changes/" ]
org.h2.jdbc.JdbcSQLTimeoutException: Timeout trying to lock table "DATA"; SQL statement:
UPDATE data SET accessed=? WHERE k=? AND version=? [50200-232]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:572)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:489)The two problems are related: the file is too big and the statements are timing out.what should we redefine in the gerrit.config file ?See below.HTH