Edit: Google Cloud at its finest. Made absolutely no changes but deployed fine this morning.
Error after ~10m of deployment (10+ deploy attempts). <
I have this problem too when deploying my custom image to AppEngine flex. My image requires a few ML models and takes around 2 hours to build and GAE does not seem to like it.
To build your container images outside of Google Cloud Platform, you must first upload your images to a container image repository before you can deploy your images to App Engine with the gcloud app deploy command.
In short, push your image to Google Container Registry or container image repository of your choice, then deploy with this command
gcloud app deploy --image-url gcr.io/YOUR_PROJECT_ID/YOUR_CONTAINER_IMAGE
More info here and here
For my case, I've found out the problem was that I have the same version for all gcloud app deploy
command.
When there's traffic, the deployment will timeout.
According to this you can change the build timeout setting with:
gcloud config set app/cloud_build_timeout 1000
Setting it to 1000 seconds in this example.