Getting heapdump for our services is very important for doing any memory profiling to debug any leaks or performance issues. Unfortunately it is not that straight forward. Fortunately, it is not impossible either! We need to SSH in the container in which our service is running. Go to App Engine → Instances page and select your service from the 'services' dropdown. SSH into any of the instances: Ignore this and SSH into VM. Once you SSH, you should be able to see cloud shell as below. If you are logging in for the first time, there may be some questions asking for SSH key. You can leave the key blank and continue. This shell is the Linux VM on which our docker image is running. We need to find out more details about it before we can do anything with it. There are a bunch of images running. We are interested in the first one ('us.gcr.io/.....') running in a container named 'gaeapp'. Now we need to go inside this docker c...