-
Bug
-
Resolution: Unresolved
-
Blocker
-
Jenkins version: 2.387.3
openjdk 11.0.19
Uno-choice:2.8.0
Commons-lang3-api:3.17.0-84.vb_b_938040b_078
Commons-text-api:1.11.0-94.v3e1f4a_926e49
jquery3-api:3.7.0-1
antisamy-markup-formatter:162.v0e6ec0fcfcf6
script-security:1369.v9b_98a_4e95b_2d
Number of jobs: 398
Jenkins disk size: 87G
Jenkins master is deployed on Kubernetes
Jenkins version: 2.387.3 openjdk 11.0.19 Uno-choice:2.8.0 Commons-lang3-api:3.17.0-84.vb_b_938040b_078 Commons-text-api:1.11.0-94.v3e1f4a_926e49 jquery3-api:3.7.0-1 antisamy-markup-formatter:162.v0e6ec0fcfcf6 script-security:1369.v9b_98a_4e95b_2d Number of jobs: 398 Jenkins disk size: 87G Jenkins master is deployed on Kubernetes
I am experiencing increasing slowness on the "Build with Parameters" page for Jenkins jobs that use the UnoChoice plugin. The page initially loads quickly after a Jenkins restart, but progressively becomes slower over time (especially after a few days). Restarting Jenkins immediately resolves the slowness, but the degradation pattern repeats. I am are currently restarting jenkins twice per day to mitigate this.
Cascading setup example
In my job configuration, I have a cascading effect involving three parameters:
- A Choice Parameter named region, with static values (e.g., us-west, us-east, eu-central).
- An Active Choices Reactive Parameter named environment, which depends on region.
- Another Active Choices Reactive Parameter named service, which depends on both region and environment.
Here’s a simplified version of the parameter scripts:
Choice Parameter – region
- Type: Choice Parameter
- Values:
us-west us-east eu-central
Active Choices Reactive Parameter – environment
- Groovy Script:
if (region == "us-west") { return ["dev", "staging", "prod"] } else if (region == "eu-central") { return ["dev", "prod"] } else { return ["dev"] }
Active Choices Reactive Parameter – service
- Groovy Script:
def url = "https://placeholder-url.com/api?region=${region}&env=${environment}" try { def conn = new URL(url).openConnection() conn.setConnectTimeout(3000) conn.setReadTimeout(3000) def result = conn.getInputStream().getText().trim() return result ? result.tokenize(',') : ["No Result Found"] } catch (Exception e) { return ["Error Fetching Results"] }
Fallback script for service:
return []
Steps to Reproduce
- Create a freestyle or pipeline job with UnoChoice dynamic parameters.
- Configure parameter region as a static Choice Parameter.
- Configure environment as an Active Choices Reactive Parameter that depends on region.
- Configure service as another Active Choices Reactive Parameter that depends on both region and environment, with a Groovy script (e.g., querying external APIs or computing dropdowns).
- Observe the load time of the "Build with Parameters" page immediately after a Jenkins restart.
- Leave Jenkins running for several hours/days.
- Revisit the same page and observe the increasing load time.
Expected Behavior
The parameter page should be consistent regardless of instance uptime.
Observed Behavior
- Load time for the parameter page increases over time. For instance:
- After restart: ~1 second
- After 4 hours: ~5 seconds
- After 12 hours : ~20+ seconds
- Restarting Jenkins resets the performance.
- The bigger the instance is in terms of job count and disk size, the more the parameter rendering slows down in correlation with uptime.