You can debug an unhealthy app using Google Cloud Logging and other GCP tools even if the app has become unresponsive. A test app is provided that simulates the problem in an experiment for the purpose of explaining the debugging process with App Engine Flex.
Prerequisites:
- GCP Project with billing enabled
- Google Cloud SDK installed
The app randomly stalls on incoming requests by going to sleep.
Follow these steps to deploy and run the app.
Set your project as the default in gcloud
GOOGLE_CLOUD_PROJECT=[Your project]
gcloud config set project $GOOGLE_CLOUD_PROJECT
Enable App Engine
gcloud app create
Deploy the app
gcloud app deploy
Browse to the app
gcloud app browse
Set up Apache Bench In the Cloud Shell or Linux command line
sudo apt-get install apache2-utils
Send some requests to your app
ab -n 1000 -c 5 https://${GOOGLE_CLOUD_PROJECT}.appspot.com/