JVM GC logging from AWS Lambda?
1250 Репутация автора
Can anyone suggest an applicable strategy for logging GC events from within AWS Lambda execution?
I am looking into something as close as possible to
-XX:+PrintGC kind of logging, but since I can't really send any startup parameters to the lambda JVM process, it seems like the only way is by live JMX introspection? If that is the only way, any library or standardized approach applicable for AWS Lambda (tools that depend on running process, like VisualVM are unfortunately out of question)?
561 Репутация автора
Use jvisualvm in the jdk bin directory. It's an excellent toolАвтор: Just another Java programmer Размещён: 19.07.2016 07:57
6068 Репутация автора
I'm not familiar with AWS Lambda, but if you are looking for JMX introspection you can find code example by link below.
Unfortunately, JMX information isn't as rich as GC logs, but some information such as per generation memory dynamics are available.Автор: Alexey Ragozin Размещён: 21.07.2016 06:03
1974 Репутация автора
It does not work with all available arguments, but you can set the JAVA_TOOL_OPTIONS environment variable in your AWS lambda to pass such flags. For example, I'll often pass "-verbose:class" to debug poor cold start performance.Автор: tgoodhart Размещён: 06.04.2018 04:43