Skip to content

Out of memory and unfinished stream error #1798

Answered by BurntSushi
vijay-naidu asked this question in Q&A
Discussion options

You must be logged in to vote

Without a reproduction, there is nothing I can do but offer simple guesses.

  1. Did I read correctly that you're searching for 46 million patterns? The -F flag will cause ripgrep to use aho-corasick at least, but yes, it's going to both take a long time to build and it is expected to use a lot of memory for each ripgrep process you use.
  2. ripgrep requires that each line fit in memory. So if you're running multiple ripgrep processes in parallel and your files have huge lines, then that could also be a source for large memory usage.

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by BurntSushi
Comment options

You must be logged in to vote
1 reply
@BurntSushi
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants