Enable GC logging

Hello there,

 As we are having a very strange issue (integration servers leaving the cluster on a daily basis), we need to enable the garbage collector logs on all servers so we can analyze what could be causing long gc.

Do you have any idea how we can accomplish this? We basically need to get a log file with pattern gc.log. in /99/IntegrationServer/instances/default/logs.
Our integration servers have version 9.9. We are using Teracotta.

Thank you in advance!
Best regards,
Oliver

Set each GC parameter on a separate line in the custom_wrapper.conf file, as follows:

wrapper.java.additional.105=-Xloggc:/99/IntegrationServer/instances/default/logs/gc.log-$(date +%Y_%m_%d-%H_%M)
wrapper.java.additional.106=-XX:+PrintGCDetails
wrapper.java.additional.107=-XX:+DisableExplicitGC
wrapper.java.additional.108=-XX:-HeapDumpOnOutOfMemoryError

I suppose you need a restart after adding this setting.

1 Like

Hi M@he$h,

It's working. 
Thanks!

Oliver