Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Can I generate an alarm related to the Garbage Collector?
The other day we showed the Visualvm to our IT manager so that he could monitor the Liferay server and he told us that he did not want to be looking at that screen, but wanted that if the Garbage Collector took more than a certain time, an alarm would be generated and he waited for a message or mail to reach him.
I have been searching the internet and I have not found anything that does that, only plugins like the Visual GC that are detailed but do not warn. Our manager's idea is not to have one person watching.
Is there a process that I can monitor and realize how long the Garbage Collector is taking?
Yesterday it occurred to me that maybe I could monitor "Stop-the-World", is it possible? How do I recognize it?
Do you have any ideas or have you implemented something that can help me?
Thanks in advance
Sounds like an x-y problem - if this is an option, then it's a feature of the underlying JVM and you should check which exact JVM you're using (vendor+version) and check the configuration options of the GCs available.
I don't expect notification "during" stop-the-world events. But GC is typically well configurable and you should look into those options. From ancient past I remember the recommendation for the dimension of the heap size to be "as small as possible with reasonable margin", so that a full GC doesn't take awfully long. I'm not sure if that still applies to current GCs, or to which of them.
If you have not configured anything for your GC, then this is where you should start: Configure the algorithm, default sizes of the different generations of memory. But in general it should be something that your JVM documentation reveals, rather than Liferay.
Powered by Liferay™