quota plugin can not startup and the gerrit server is no response

32 views
Skip to first unread message

Yingchun Li

unread,
Dec 23, 2025, 4:40:33 AM (yesterday) Dec 23
to Repo and Gerrit Discussion
Hi,
    After building and installing the quota plugin, there is error in error_log:

[2025-12-23T17:01:17.911+08:00] [SSH-Interactive-Worker-25] ERROR com.google.gerrit.server.git.WorkQueue : WorkQueue thread SSH-Interactive-Worker-25 threw exception
java.lang.IncompatibleClassChangeError: Method 'com.google.gerrit.entities.Project$NameKey com.google.gerrit.entities.Project$NameKey.parse(java.lang.String)' must be Methodref constant
at com.googlesource.gerrit.plugins.quota.TaskQuotas.estimateProject(TaskQuotas.java:148)
at com.googlesource.gerrit.plugins.quota.TaskQuotas.isReadyToStart(TaskQuotas.java:92)
at com.google.gerrit.server.git.WorkQueue$Executor.lambda$isReadyToStart$7(WorkQueue.java:668)
at com.google.gerrit.server.plugincontext.PluginContext.runLogExceptions(PluginContext.java:245)
at com.google.gerrit.server.plugincontext.PluginMapContext.lambda$runEach$1(PluginMapContext.java:154)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at com.google.gerrit.server.plugincontext.PluginMapContext.runEach(PluginMapContext.java:154)
at com.google.gerrit.server.git.WorkQueue$Executor.isReadyToStart(WorkQueue.java:662)
at com.google.gerrit.server.git.WorkQueue$Executor.waitUntilReadyToStart(WorkQueue.java:634)
at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:908)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)

Then the gerrit server became unresponsive, even the 
ssh -p admin@xxx gerrit show-connections 
hangs.
    Since there is no ready package on gerrit 3.12.3, so I built the quota myself.
and my gerrit version is 3.12.3 and jdk is 21.
Br,
Yingchun

Adithya Chakilam

unread,
Dec 23, 2025, 4:46:29 PM (17 hours ago) Dec 23
to Repo and Gerrit Discussion

Did you try building the plugin intree or standalone ?

https://gerrit-review.googlesource.com/Documentation/dev-build-plugins.html

Yingchun Li

unread,
2:17 AM (8 hours ago) 2:17 AM
to Repo and Gerrit Discussion
On Wednesday, December 24, 2025 at 5:46:29 AM UTC+8 Adithya Chakilam wrote:

Did you try building the plugin intree or standalone ?

I built the plugin with intree. 
Maybe gerrit version doesn't match is the problem, the gerrit is latest master,
and plugin is also latest master, but I installed the plugin to  gerrit 12.3.
I have downloaded the 12.3 plugin in 
Now it works. Thanks.

I have updated the quota.config on All-Projects, but it seems I still need to restart
the Gerrit server for the changes to take effect. Is that correct?
Br,
Yingchun

Matthias Sohn

unread,
5:38 AM (4 hours ago) 5:38 AM
to Yingchun Li, Repo and Gerrit Discussion
On Wed, Dec 24, 2025 at 8:17 AM Yingchun Li <sword.l...@gmail.com> wrote:


On Wednesday, December 24, 2025 at 5:46:29 AM UTC+8 Adithya Chakilam wrote:

Did you try building the plugin intree or standalone ?

I built the plugin with intree. 
Maybe gerrit version doesn't match is the problem, the gerrit is latest master,
and plugin is also latest master, but I installed the plugin to  gerrit 12.3.
I have downloaded the 12.3 plugin in 
Now it works. Thanks.

I have updated the quota.config on All-Projects, but it seems I still need to restart
the Gerrit server for the changes to take effect. Is that correct?

Restart the quota plugin or the Gerrit server
 
--
--
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/c413023c-eea1-43c7-9a31-5ed62ba479e1n%40googlegroups.com.

Yingchun Li

unread,
6:35 AM (3 hours ago) 6:35 AM
to Repo and Gerrit Discussion
On Wednesday, December 24, 2025 at 6:38:04 PM UTC+8 Matthias Sohn wrote:
On Wed, Dec 24, 2025 at 8:17 AM Yingchun Li <sword.l...@gmail.com> wrote:


On Wednesday, December 24, 2025 at 5:46:29 AM UTC+8 Adithya Chakilam wrote:

Did you try building the plugin intree or standalone ?

I built the plugin with intree. 
Maybe gerrit version doesn't match is the problem, the gerrit is latest master,
and plugin is also latest master, but I installed the plugin to  gerrit 12.3.
I have downloaded the 12.3 plugin in 
Now it works. Thanks.

I have updated the quota.config on All-Projects, but it seems I still need to restart
the Gerrit server for the changes to take effect. Is that correct?

Restart the quota plugin or the Gerrit server
 
Thank you Matthias, there are some typo in the document, and I generate a patch, but seems
do not have access capability on the quota plugin, so I paste here:

From 4a8af591ee05a10546100a3032b693a0c62f8908 Mon Sep 17 00:00:00 2001
From: yingchunli <sword.l...@gmail.com>
Date: Wed, 24 Dec 2025 19:18:11 +0800
Subject: [PATCH] Document:fix typo

Also fix the style mess. When open the documentation from gerrit plugins,
some text shows as hyperlink
---
 src/main/resources/Documentation/config.md | 24 +++++++++++-----------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/main/resources/Documentation/config.md b/src/main/resources/Documentation/config.md
index 2d3a925..0d59972 100644
--- a/src/main/resources/Documentation/config.md
+++ b/src/main/resources/Documentation/config.md
@@ -22,7 +22,7 @@ the `quota.config` file locally and pushing back the changes. The
     maxTotalSize = 200 m
 ```
 
-<a id="sizeLimitExceededUnknownRequestSizeMsg" />
+<a id="sizeLimitExceededUnknownRequestSizeMsg" > </a>
 `quota.<namespace>.sizeLimitExceededUnknownRequestSizeMsg`
 : Optional custom message returned when a size quota in this namespace is exceeded **and the
 requested size is not known in advance**.
@@ -31,7 +31,7 @@ of bytes to be written is not yet available.
 For example, when Gerrit receives a commit, its size cannot be determined until the transfer
 completes.
 
-<a id="sizeLimitExceededKnownRequestSizeMsg" />
+<a id="sizeLimitExceededKnownRequestSizeMsg" > </a>
 `quota.<namespace>.sizeLimitExceededKnownRequestSizeMsg`
 : Optional custom message returned when a size quota in this namespace is exceeded **and the
 requested size is known upfront**.
@@ -51,11 +51,11 @@ default message is used. When multiple quota enforcers contribute to a quota
 calculation, the message from the most restrictive enforcer (the one with the
 lowest remaining quota) is selected.
 
-<a id="maxProjects" />
+<a id="maxProjects" > </a>
 `quota.<namespace>.maxProjects`
 : The maximum number of projects that can be created in this namespace.
 
-<a id="maxRepoSize" />
+<a id="maxRepoSize" > </a>
 `quota.<namespace>.maxRepoSize`
 : The maximum total file size of a repository in this namespace. This is
 the sum of sizes of all files in a Git repository where the size is
@@ -63,7 +63,7 @@ taken using the File.length() method. This means that, for example, a
 reference file is counted as 41 bytes although it typically occupies a
 block of 4K in the file system.
 
-<a id="maxTotalSize" />
+<a id="maxTotalSize" > </a>
 `quota.<namespace>.maxTotalSize`
 : The maximum total file size of all repositories in this namespace.
 This is the sum of sizes of all files in all Git repositories in this
@@ -165,7 +165,7 @@ the following section should be added into the `gerrit.config` file:
     useGitObjectCount = true
 ```
 
-<a id="useGitObjectCount" />
+<a id="useGitObjectCount" > </a>
 `plugin.quota.useGitObjectCount`
 : Use git object count. If true, *repoSize = looseObjectsSize +
 packedObjectsSize*, where *looseObjectsSize* and *packedObjectsSize* are given
@@ -223,7 +223,7 @@ Format of the rate limit entries in `quota.config`:
 
 The group can be defined by its name or UUID.
 
-<a id="rateLimitType" />
+<a id="rateLimitType" > </a>
 `group.<groupName>.<rateLimitType>`
 : identifies which request type is limited by this configuration.
 The following rate limit types are supported:
@@ -231,11 +231,11 @@ The following rate limit types are supported:
 for the given group
 * `restapi`: rate limit for REST API requests
 
-<a id="rateLimit" />
+<a id="rateLimit" > </a>
 `group.<groupName>.<rateLimit>`
 : The rate limit (first parameter) defines the maximum allowed request rate.
 
-<a id="rateUnit" />
+<a id="rateUnit" > </a>
 `group.<groupName>.<rateUnit>`
 : Rate limits can be defined using the following rate units:<br />
 `/s`, `/sec`, `/second`: requests per second<br />
@@ -243,7 +243,7 @@ for the given group
 `/h`, `/hr`, `/hour`: requests per hour<br />
 `/d`, `/day`: requests per day<br />
 
-<a id="burst" />
+<a id="burst" > </a>
 `group.<groupName>.<storedRequests>`
 : The `burst` parameter allows to define how many unused requests can be
 stored for later use during idle times. This allows clients to send
@@ -284,7 +284,7 @@ The default message reads:
 `Exceeded rate limit of ${rateLimit} REST API requests/hour (or idle `
 `time used up in bursts of max ${burstsLimit} requests)` .
 
-<a id="maxConnectionsPerUserForTask" />
+<a id="maxConnectionsPerUserForTask" > </a>
 `maxConnectionsPerUserForTask`
 : Even though we have ratelimiting over a window of period, costly restapis
 run concurrently by users can still bring down the server. Using the
@@ -366,7 +366,7 @@ Example:
 
 ```
  [quota "*"]
-   softMaxStartPerUserForQueue = 3 SSH-Interavtive-Users
+   softMaxStartPerUserForQueue = 3 SSH-Interactive-Works
 ```
 
 This config make sures that as soon as a specific user has 3 tasks running, it ensures
--
2.52.0 
0001-Document-fix-typo.patch
Reply all
Reply to author
Forward
0 new messages