I saw that you haven’t had a response on this topic yet, were you able to find a solution for this error?
If not, then could you please provide a few additional details for me to understand your use-case better?
Could you clarify that you’re matching a billion ObjectId by putting them all into an array?
How big is your database?
MongoDB version being used
What are you trying to achieve/requirements?
More details regarding the query portion of your code snippet? (Redact any personal or sensitive information before posting here)
Check MongoDB logs for any errors that occur when you get this error at application end.
What is throwing this error? Could you post the whole error message, including lines before and after this error?