Java heap dump in Google App engine standard environment?

289 views
Skip to first unread message

Kishu Agarwal

unread,
Sep 27, 2018, 1:33:56 PM9/27/18
to Google App Engine

I have an Java application running on Google App Engine Standard Environment for which I want to analyse memory usage by taking heap dump.

Are there any tools which can help in this task?

I know of HotSpotDiagnosticMXBean which can do this, but it will write the file to the local filesystem which I don't have access to on app engine. Is there any way to stream the dump to cloud storage?

Kishu Agarwal

unread,
Sep 27, 2018, 1:33:56 PM9/27/18
to Google App Engine

George (Cloud Platform Support)

unread,
Sep 27, 2018, 6:49:38 PM9/27/18
to Google App Engine
Hello Kishu, 

You are right about the local file system in App Engine Standard, and indeed, saving the heap dump rather to Cloud Storage might prove the right solution. There is no such feature yet, but development is under way. As yet, we cannot offer a good estimate for a final implementation date. If you think this may speed things up, you are encouraged to open an issue with similar content in the Public Issue Tracker

Kishu Agarwal

unread,
Sep 28, 2018, 1:50:57 PM9/28/18
to Google App Engine
Thanks George for the quick response. That was very helpful.

I just had a quick question. I am assuming that taking heap dump can only be done in JAVA 8 runtime but not in JAVA 7 runtime because of the classes whitelisting in Java 7. Is this correct or there are ways to take heap dump in Java 7?

George (Cloud Platform Support)

unread,
Sep 28, 2018, 4:18:48 PM9/28/18
to google-a...@googlegroups.com
Hi Kishu, 

Unfortunately, I don't have access to such information; it is Developers' domain. Decisions on Java 7 or 8 may change, but, of course, it would be ideal to have the heap dump feature implemented for both versions. If you open a related issue in the Public Tracker, one of the advantages would then be exactly the fact that it gets updated with progress and information of interest. 

Kishu Agarwal

unread,
Sep 30, 2018, 10:31:43 AM9/30/18
to Google App Engine
Thanks George. Sure I would open the issue in the tracker.

George (Cloud Platform Support)

unread,
Sep 30, 2018, 2:49:33 PM9/30/18
to Google App Engine
Hello Kishu, 

Glad to hear you'd like to keep informed about the progress of your feature request. 

Do not hesitate to open a separate issue if you meanwhile face a new, different problem. 
Reply all
Reply to author
Forward
0 new messages