Skip to content

Fix out-of-memory error on feature import#762

Merged
garrettjstevens merged 2 commits intomainfrom
fix_import_out_of_memory
Mar 16, 2026
Merged

Fix out-of-memory error on feature import#762
garrettjstevens merged 2 commits intomainfrom
fix_import_out_of_memory

Conversation

@garrettjstevens
Copy link
Copy Markdown
Contributor

When importing features, it's possible for the node process to run out of memory. This happens when updating all the added documents to have a "ready" status. If you do an updateMany that is too big, the return value can be so big that the node process runs out of memory, even if you don't store it to a variable. This fixes it by running updateMany in batches of up to 1000 documents at a time.

Also a minor update to allow apollo file import to take a file ID in addition to a file name.

@garrettjstevens garrettjstevens self-assigned this Mar 10, 2026
@garrettjstevens garrettjstevens merged commit 868f11a into main Mar 16, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant