We have an open beta of an app which occasionally causes the heapspace to overflow. The JVM reacts by going on a permanent vacation.
To analyze this I would like to
What worked for me was to simply issue the command with sudo as in:
sudo jmap -heap 21797