This repository was archived by the owner on Mar 4, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 164
This repository was archived by the owner on Mar 4, 2026. It is now read-only.
[Firestore] Throwing 14 UNAVAILABLE: Query timed out on "simple" query #2055
Copy link
Copy link
Closed
Labels
api: firestoreIssues related to the googleapis/nodejs-firestore API.Issues related to the googleapis/nodejs-firestore API.needs more infoThis issue needs more information from the customer to proceed.This issue needs more information from the customer to proceed.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Thanks for stopping by to let us know something could be better!
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
-
Is this a client library issue or a product issue?
Yes its the client library -
Did someone already solve this?
- The problem is very weird, dont know if just my case
- Do you have a support contract?
No
Environment details
- OS: Linux and Mac
- Node.js version: 18
- npm version: 10.5.0
@google-cloud/firestoreversion: 7.6.0
Steps to reproduce
- Am just making a "simple" query that uses the OR operator and the new inequality operator on multiple fields, the query is searching over an Id that its repeated on my database with aprox 27k items:
This is an example of the query:
.where('myId', '==', 123)
.where('createdAt', '<=', new Date())
.where(
Filter.or(
Filter.where('deletedAt', '>=', new Date()),
Filter.where('deletedAt', '==', null)
)
)
.orderBy('createdAt', 'desc')
.limit(500)
- The query just hangs out and never finished, throwing the error
14 UNAVAILABLE: Query timed out. Please try either limiting the entities scanned, or run with an updated index configuration..
What may be happening here?, maybe am missing some weird index?, I tried to run the explain function but with the analyze flag the result is the same, without it, the plan summary its this one:
PlanSummary {
indexesUsed: [
{
properties: '(myId ASC, createdAt DESC, deletedAt DESC, __name__ DESC)',
query_scope: 'Collection'
},
{
properties: '(myId ASC, deletedAt ASC, createdAt DESC, __name__ DESC)',
query_scope: 'Collection'
}
]
}
Thanks in advance!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: firestoreIssues related to the googleapis/nodejs-firestore API.Issues related to the googleapis/nodejs-firestore API.needs more infoThis issue needs more information from the customer to proceed.This issue needs more information from the customer to proceed.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.