Closed tylermaran closed 5 months ago
Hi there, I'm unable to reproduce locally but I do have some thoughts.
Killed
message in here makes me think OOM may be involved. For those docs that do need ocr, we suggest 16GB min for memory. For your mixed workload you may not need this much, but I'd suggest stepping the size up and seeing if this helps. Also note the variable here that you can set to return 503s and help mitigate an OOM kill. This would complement parallel mode's RETRY_ATTEMPTS, and hopefully bounce the request to an instance with less load.Expecting value
may be from the "controller" server after the worker has just died. I think I've seen this in rare cases where we try to parse an empty http response here. If you're able to modify the code before trying again, perhaps you can add some extra debugging here.Hope this helps!
Appreciate the info. Yea it's likely an OOM issue. I already have some retry logic on my API side, so I'll test it out with the UNSTRUCTURED_MEMORY_FREE_MINIMUM_MB
var to see when it's running out of memory. In general I've stepped everything up to 16gb and it's not thrown as many errors.
Right now I'm just deploying the latest
docer image. But I'll do some local testing and try to trigger the error with additional logs. Probably fine to close the issue for now and I'll add more info if I can reproduce locally.
Sounds good! Lmk how it goes.
Describe the bug I'm getting consistent 500 errors when I enable
UNSTRUCTURED_PARALLEL_MODE_ENABLED
. Not every request, but about 50% of documents are failing when enabled. I'm sending about 60 pdfs over for parsing (over a ~10 second window). There is a mix of high quality pdfs (no ocr needed) and documents that need to be ocr'd.Running the same number of documents through without parallel mode succeeds, but some of the OCR documents time out after a couple minutes. When I test parallel mode with a single OCR document, it's roughly 3x faster. But when i try to do a bit more volume it breaks.
To Reproduce
Make about 50 requests with parallel mode enabled and using the
auto
strategy.Environment:
Additional context
Logs I'm getting back. Just a mix of 500s in with the successful requests.