Skip to content

Deploying firestore functions attached to many different Firestore instances results in quota exceeds error #6574

@taeold

Description

@taeold

During deployment of a 2nd Gen Firestore functions, the CLI retrieves metadata associated with the Firestore database in order to ensure that the region of the Firestore database matches the region of the deployed function:

export async function ensureFirestoreTriggerRegion(
endpoint: backend.Endpoint & backend.EventTriggered
): Promise<void> {
const db = await firestore.getDatabase(
endpoint.project,
endpoint.eventTrigger.eventFilters?.database || "(default)"
);

Unfortunately, when a large number of functions are deployed that each target a different Firestore instance (you are allowed to have multiple instances of Firestore on a single GCP project), developer will likely see a quota exceeds error:

Quota exceeded for quota metric 'Database operation requests' and limit 'Database Operations Per Minute' of service 'firestore.googleapis.com' for consumer ...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions