I keep getting 'java.lang.OutOfMemoryErro
r: Java heap space' and because of that my java app gets hanged and become unresponsive. while taking heap dump I see following error:
root@ip-10-0-55-90:/share/apps/apache-tomcat/current/logs# /usr/java/jdk1.7.0_25/bin/jmap -dump:format=b,file=java_tomcat.bin 47929
47929: Unable to open socket file: target process not responding or HotSpot VM not loaded
The -F option can be used when the target process is not responding
I would like to know how to monitor tomcat' heap usage proactively and that to do in such cases to fix it?