puppetlabs/puppetdb — pull request #268 by grimradical (2012-08-30 03:19:22+00:00)
Title: Move aside old heap dumps prior to daemon startup

The JVM can't successfully write out a heap snapshot if a file already
exists at the target location (which is stupid, but them's the breaks).
This commit adds logic to our init scripts to move any pre-existing heap
snapshot out of the way prior to starting the daemon. This means that we
retain one previous heap snapshot, but that should help during
situations where an OutOfMemoryError prompted an immediate service
restart (to restore operations), but we'd still like a heap dump for
forensic analysis.

Signed-off-by: Deepak Giridharagopal