0

I have a Java application "A" running on Linux. It makes REST calls to another Java program "S" running as a service on top of Liberty. "S" is getting killed, presumably due to lack of memory. I have tried instrumenting both Java programs using "virtualvm" and "top", and what I'm observing from both seems contradictory. For example, virtualvm indicates that "S" has a "size" of ~2.8GB, while "top" says that "S" has a "VIRT" memory size of over 13GB. If I believe "top", it's reasonable that the program should be getting killed, but if I believe "virtualvm", it seems like there is plenty of headroom.

Can someone explain this discrepancy, and advise me which instrument to believe?

user3124028
  • 51
  • 1
  • 3
  • Memory is also limited by process (by the kernel) `ulimit -a` will show the limit. [There are several good ways to measure memory usage on linux outlined in another question](http://stackoverflow.com/questions/131303/how-to-measure-actual-memory-usage-of-an-application-or-process), they will give you (and us, people trying to help) information about the processes. – grochmal May 26 '16 at 21:58
  • "VIRT" is not RAM and you can't run out of it. "RES" is a better number to look at. – that other guy May 26 '16 at 22:45

0 Answers0