Hello,
I'm facing a rather weird issue with Cloud Functions.
Sometimes, while updating a function (gcloud functions deploy), I get a bunch of error logs due to the healthcheck sending requests to the instance even though the deployment is not completed yet. An example timeline is the following:
Here's a sample of the error log:
Is this behaviour expected?
Hi @gasgallo,
Welcome to Google Cloud Community!
I see that your health check makes frequent requests that it sometimes returns a pending queue abort error "The request was aborted because there was no available instance” while you’re updating an existing function. The behavior here is very likely an intended behavior as illustrated by scenarios explained below.
Usually, this issue may arise either because the number of max_instances
you’ve set is preventing Cloud Function from scaling (identified by error code 429), or Cloud Function is intrinsically having an issue managing the ongoing traffic (identified by error code 500). Your error message indicates that your case falls under code 500.
Here are the recommended methods that may help to address this behavior:
If none of those methods is helpful, note that our team is also keeping an eye on the nature of this scenario. We have documented this issue in the public tracker for further investigation.
I hope the possible solutions above work out for you.
Hi @ronnelg,
thank you for the reply. I already went through the troubleshooting that you suggested but it doesn't apply to my scenario.
In my case, during the cloud function update there's no traffic (this is because the cloud function is triggered only at specific times of the day).
Moreover, the healthcheck failure comes from an internal GCP healthcheck (not a custom healthcheck), the endpoint sending the healthcheck ends with `appspot.com/_ah/healthcheck`.
Finally, the number of max instances is already set to 3000, thus I don't think this is the issue.
Looking forward to more suggestions and updates.