Java memory profiler

326 views
Skip to first unread message

Joshua Fox

unread,
Jun 25, 2016, 3:14:20 PM6/25/16
to Google App Engine
I suspect a "leak" in my Java application on App Engine Flexible Environment and I'd like to trace memory, as I would do with JProfiler, YourKit, or VisualVM on my local machine. Heroku has some functionality for this. 

I'd like to trace the classes, allocation point, and path to GC root for objects allocated during a certain action, for which I set checkpoints. Or if that is not possible, I'd like a heap dump of the (enormous) memory of my instance.

How can this be done in App Engine Flex Environment?

Adam (Cloud Platform Support)

unread,
Jul 1, 2016, 1:20:07 PM7/1/16
to Google App Engine
Configuring JVM options during deployment currently isn't possible with the Cloud SDK, but it does sound like a good feature request to make on the issue tracker.

It is possible to rebuild the runtime docker image from source however (see the github project links) and insert your own JVM options into jetty_cmd.sh so this may be one way to enable native memory tracking or JMX on the deployed instance. I've only done minimal testing on this myself though.

Joshua Fox יהושע פוקס

unread,
Jul 3, 2016, 3:24:13 AM7/3/16
to google-a...@googlegroups.com
 OK, I added a ticket.

It would be a great enhancement deep memory and performance profiling for Flexible Environment (and other Google Cloud platforms), perhaps as part of Stackdriver.

--
You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/V11gEUoa-eo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/705209d9-94c0-4660-9108-7ed32a2c1f42%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


Reply all
Reply to author
Forward
0 new messages