-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
Jenkins v2.190.2
Job DSL v1.77
TL;DR
We would like to know if it is possible (or already on your roadmap) to upgrade the version of Groovy in jobdsl-plugin/jenkins-core as we believe it will help with a memory leak we've been seeing.
Background
We have a use case in our jenkins deployment where we build pipelines via the jobdsl plugin. We have noticed that when we execute this process multiple times we eventually run out of memory.
After lots of investigation and heap dump analysis we believe the issue is related to https://issues.jenkins-ci.org/browse/JENKINS-46687 and that the constant use of the GroovyShell.parse / parseClass eventually exhausts the memory. Part of the analysis that leads us to believe this is the attached heap analysis showing that there are instances of the MetaMethodIndex class that are never garbage collected.
We did try and set -Dgroovy.use.classvalue=true as per https://issues.jenkins-ci.org/browse/JENKINS-33358 , but that doesnt seem to work for us.
Looking at this comment in the groovy issues it suggests that upgrading to 2.5.6+ will help improve the evaluation of scripts in Groovy.
So we are wondering if it is possible to schedule (if not already scheduled) the upgrade of Groovy version? Or maybe even if you could suggest some other potential causes of the problem / solutions to try out?
Please let us know if you need more detail around this.
- is related to
-
JENKINS-53372 Upgrade Groovy from 2.4.x to 2.5.x
-
- Open
-
Speaking for Job DSL, I would support updating to 2.5.x and I am willing to make the necessary changes in Job DSL.
There has been a PR for Jenkins core, but it has been closed. See
https://github.com/jenkinsci/jenkins/pull/3605. As mentioned in the closing comment by danielbeck this needs to be a joint effort as not only core and job-dsl are affected. There needs to be someone driving the process, e.g. starting a discussion on the mailing list. bez625 can you do that?