I have a docker container that I was attempting to deploy on Google Cloud Run but it takes about 7 minutes to load all the content of a SpringBoot app. When it's deployed using our cluster, we can set a startupProbe to delay the checking and all is good but I was going to try out Cloud Run for our dev site and I keep getting a "The user-provided container failed to start and listen on the port defined provided by the PORT=8080" error which I believe are due to the fact that it's timing out. I'm able to deploy a version of the same container with just a subset of the data, so I can confirm that it's not actually a PORT issue. I also tried to edit the YAML under the service details to customize the startupProbe but that failed. It seems like Cloud Run has a hard cutoff of about 5 minutes before it fails and I need around 8 minutes, so I'm wondering if there's a way to increase the startupProbe time to something longer? Or do I just have to stick with GKE?
You cannot change the Cloud Run health check. Your instance must start responding to HTTP requests within four minutes link. A request waiting for a container instance to start will be kept in a queue for a maximum of 10 seconds.
Your solution is to redesign your deployment (container) so that is ready to run right away and is not downloading packages/jars, or anything else that takes substantial time. Otherwise, you must select a different service to deploy your application to.