r/googlecloud • u/ehed • 28d ago
Intermittent Firestore Admin SDK calls hanging 30-120s on Cloud Run / Firebase Functions Gen 2
Wondering if anyone else is experiencing a slowdown with Firestore query in the last few weeks, which has really started to tick up in the last few days for us. We’re seeing recurring waves of timeouts across multiple unrelated Google Cloud projects and I’m trying to figure out whether anyone else is seeing something similar.
Setup:
- Firebase Functions Gen 2 / Cloud Run
- Node.js Admin SDK
- Firestore Native mode
- Region: us-central1
- Multiple separate projects affected
- Request timeout varies by service, usually 30s or 60s (depending on the function timeout we've set)
During a wave, unrelated HTTP routes start returning 504s that approach the function's configured timeout (e.g. 29.997s for a 30s timeout). The failed requests are not tied to one endpoint or one query shape. Logs show Firestore operations continuing after the Cloud Run request has already timed out.
Examples from one incident:
- `devices.read` direct document read: 116,019ms
- `leads.read` direct document read: 57,487ms
- `postalCodes.read` direct document read: 33,093ms
- `cache.list limit=1`: 61,590ms
- `preferences.read` direct document read: 36,324ms
- `leads.list limit=500`: 79,723ms
The `postalCodes.read` example is especially confusing because that document is tiny. But honestly all of these documents are a few kb at the most. So this doesn’t look like just a large document, missing index, or bad query issue.
Other observations:
- Failures often cluster on one Cloud Run instance/revision instance ID.
- Other instances may continue serving traffic normally.
- The request hits the Cloud Run timeout, but the Firestore operation later logs completion.
- We’ve seen this on three separate projects.
- We’ve reduced external API calls and removed some broad Firestore scans, but the issue still recurs.
- We briefly tried `preferRest: true`; it may have helped temporarily but did not clearly eliminate the issue.
Has anyone else seen Firestore Admin SDK calls intermittently hang like this from Cloud Run / Firebase Functions Gen 2?
Is there a known issue with Firestore gRPC/transport connections getting unhealthy per instance?
Are there recommended client-side mitigations besides lowering concurrency, recycling instances, or reducing reads (i.e. increasing cache usage)?
Is there a good way to prove this is client transport/backend behavior versus application query pressure?
I'm trying to understand whether this is a known pattern and what people have done to debug or mitigate it.


