Can I generate an alarm related to the Garbage Collector?Can I generate an alarm related to the Garbage Collector?https://liferay.dev/c/message_boards/find_thread?p_l_id=119785333&threadId=1205691442024-03-28T21:15:49Z2024-03-28T21:15:49ZRE: Can I generate an alarm related to the Garbage Collector?Olaf Kockhttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1205836532021-02-01T10:17:57Z2021-02-01T10:16:45Z<p>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.</p>
<p>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.</p>
<p>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.</p>Olaf Kock2021-02-01T10:16:45ZCan I generate an alarm related to the Garbage Collector?Pedro Llantenhttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1205691432021-01-28T17:39:34Z2021-01-28T15:10:04Z<p>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.</p>
<p>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.</p>
<p>Is there a process that I can monitor and realize how long the
Garbage Collector is taking?</p>
<p>Yesterday it occurred to me that maybe I could monitor
"Stop-the-World", is it possible? How do I recognize it?</p>
<p>Do you have any ideas or have you implemented something that can help me?</p>
<p>Thanks in advance</p>