Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Cloud Function - Default STARTUP TCP probe issue

I created a gen 2 cloud function that takes 5mins to complete. Since the gen2 time out limit is 3600 and my requirements is way below that, i set the time out limit to 600 seconds.

However, the function fails to deploy with this error message "Default STARTUP TCP probe failed 1 time consecutively for container "worker" on port 8080. The instance was not started."

When I dug deeper, the underlying cloud run has a start up probe which cannot be removed with a max timeout limit of 240 seconds. This seems to timeout before the function run is completed during the deployment and kind of contradictory to the purpose of gen 2 cloud function.

I looked at logs and documentation associated with this error, so please don't provide me additional documentation links because this issue wasn't covered.

1 2 10.7K
2 REPLIES 2

Hello @avin999,

Welcome to Google Cloud Community!

The container health check is entirely different from the timeout of Cloud Function (2nd gen). The startup probe is used to know if your container has already started and is ready to accept traffic. Try looking into Configuring startup probes, which depends if you're using HTTP, TCP, or gRPC probes. 

You can also check out these related Stackoverflow posts if you have the same issue:

If the above options don't work, you can contact Google Cloud Support to further look into your case. Hope it helps, thanks!

it happens to me the same issue and I fix it by running the following: npm install -g firebase-tools