Jenkins Agent memory leak leading to Out of Heap


This issue started after I upgraded Jenkins to 2.414.1 (and all plugins updated too)
The memory of a specific Windows agent seems to be steadily increasing over time.
I gave it some breathing room with -Xmx2048M, but still, it runs out of heap after 2 days.
There’s nothing unusual with the jobs being run (declarative pipelines with jenkinsfile stored in Git and fetched using JGit) and it was working fine on the older instance of Jenkins running 2.401.1
What would be the next step to diagnose the source of the leak ?


There is a report of a memory leak in Pipeline that affects static agents running many jobs for an extended period. A fix has been attempted in the most recent release of the plugin. You might try upgrading plugins to the latest releases.


Thanks, I completely missed this issue.
I’ll try to update the plugin and see if it makes a difference