Charlie Sharpsteen
05/21/2026, 12:25 PM-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/tmp/puppetserver.hprof -Djruby.reify.classes=true
That will write a heap dump to /var/tmp/puppetserver.hprof when the service crashes. The file won't be overwritten on subsequent crashes. File size will be a little bigger than -Xmx, so /var/tmp will need to have 2.5+ GB free. HeapDumpPath can also be pointed to a different mount that does have free space.
Then, I'd copy it to a work station (heap dumps tend to compress very well with gzip) and load it into the Eclipse Memory Analyzer Tool: https://eclipse.dev/mat/
Often the "Leak Suspects" report can highlight the cause. If not, it's a process of analysis that I can't describe very well --- I usually just drink a bunch of coffee and look for trouble until I find it.