I have a service that handles all the calls made in it in memory, because we do not want to lose data, and at the same time we need this service, which ever fails due to any external dependency (e.g. DB ) Then these phased calls are usually collected and processed in the background.
If for any reason, if there are too many calls, and we run out of memory, we need to be alarmed.
So, the question is simply posed: what is the exception that I need to catch or track in order to notify me when the failure due to insufficient resources has not completed? Will this be the result of OOM in the virtual machine itself, or is there a limit to the collection level?
If there is no limit to the collection level, how would you recommend I control the use of the service? We currently use heap and memory usage metrics. It's enough? In addition, the JVMs are configured to kill on an OOM error (this is because the VM manager then restarts any process that it manages on the kill).
source share