extensions icon indicating copy to clipboard operation
extensions copied to clipboard

[firestore-counter] no available instance log in firebase distributed counter

Open haris-wilson opened this issue 3 years ago • 12 comments

Bug in Distributed counters extension. The firebase log shows this message :

The request was aborted because there was no available instance. Additional troubleshooting documentation can be found at: https://cloud.google.com/functions/docs/troubleshooting#scalability.

Screenshot (106)

I am concerned about the extra billing caused by the errors.

haris-wilson avatar Feb 26 '22 04:02 haris-wilson

Hi @haris-wilson

Although a number of updates are currently ready for release on this extension https://github.com/firebase/extensions/pull/817.

This seems like a potential new issue i'll can add this to the project board for further investigation.

dackers86 avatar Feb 26 '22 10:02 dackers86

Also concerned about the extra billing here. What's going on?

danReynolds avatar May 24 '22 15:05 danReynolds

@danReynolds what is the extra billing concern? Can you explain a bit more?

i14h avatar May 24 '22 16:05 i14h

@i14h there is a huge log list being generated for my project which if left unwatched causes increase in billing.

haris-wilson avatar Aug 02 '22 06:08 haris-wilson

Looking into this issue. Can anyone confirm that this is still happening? If so I'd like to investigate.

From what I understand, if there is no available instance, then we are generating an error log on each onWrite trigger, and this could lead to unnecessary billing. (Correct me if i'm wrong)

cabljac avatar Oct 25 '22 09:10 cabljac

hey @cabljac,

I can confirm that in our deployment of the Distributed Counter extension, we're seeing multiple 429 warnings (in the 10s) daily for The request was aborted because there was no available instance. Beyond the increased logging, does this warning mean the function was aborted completely and won't be retried at all? if so, we're missing on a lot of realtime updates to our counters.

shaibt avatar Oct 26 '22 21:10 shaibt

Any updates on the issue at hand? We've just added this extension and began receiving these errors and warnings.

habibKadiri avatar Nov 24 '22 19:11 habibKadiri

In the last 12 hours, my project has logged over 32K warnings (POST 429) with the message: The request was aborted because there was no available instance. Should I manually increase the instance count from 1 or leave it like that? Also also noticed some messages on the controllerCore: Query to find shards to aggregate failed. Error: 10 ABORTED: Aborted due to cross-transaction contention. This occurs when multiple transactions attempt to access the same data, requiring Firestore to abort at least one in order to enforce serializability. I've been facing this issue for months now.

Asuveroz avatar Nov 02 '23 13:11 Asuveroz

Resuming investigation of this now. I've seen in other contexts The request was aborted because there was no available instance when there aren't enough cloud function instances for the events coming through. I'll attempt to repro first

EDIT: reproduced this, continuing to investigate

cabljac avatar Nov 15 '23 13:11 cabljac