Closed jonahbull closed 6 years ago
Thanks for the report @jonahbull. OOM is a tricky situation in the JVM. Let me think about it...
I'm not entirely sure if it's masking a OOM exception. I'm getting the same error with --scroll-size 1
@mcantrell It was in my case, but I think any exception that caused body to be nill in scroll* would produce this behavior.
Well this has aged like a fine wine. We ending up switching to the reindexing API some years ago. Going to close this out, @drewr 😀
I ran into this issue trying to stream a not-terribly big index (~6GB) with an average document size of 2-3MB. stream2es version info:
And here's a quick log snippet that illustrates the issue:
After some investigation, I figured out that body was nil in scroll*, which of course caused the NPE trying to call re-find. I hacked in some more logging and the reason body was nil was that stream2es was OOMing (java.lang.OutOfMemoryError: GC overhead limit exceeded) trying to parse the first set of returned documents from the scroll. Lowering the scroll size, as suggested in #24, fixed that.
Long story short, it'd be nice if the exception handling, er, handled, this particular case, if only to save people time trying to figure out the real issue behind the NPE. My simple hack around this was just to add a nil check for body to the cond before the search-context-missing bits, and then throw the exception if body is nil, but my Clojure is rudimentary at best.