I have been seeing Jenkins restart randomly due to memory issues but it still seems to have a lot of heap space unused before the crash
The metaspace on the machine where my Jenkins instance is running has been slowly filling up and we are not sure why
SandboxResolvingClassLoader.parentClassCache could leak loaders:
Whenever doing an import of classes using groovy scripts within plugins, there was the possibility to leak the class loader due to the cache holding the class reference
This plugin version is included in the release 22.214.171.124. We encourage you to update to the newest version, alternatively you can manually download and install the plugin on your instance.
JENKINS-50223: Whenever a class was called within another class in a shared library, there was the possibility for it to take a very long time or never get removed from memory due to another caching issue