Replies: 3 comments
|
@dreram can you please provide the output of |
|
Thank you for the update. (venv) PS C:\projects\pythonServices\pdfService> docling --version Explanation: Any advise on how to automate this, for example from java spring boot back end. Thanks |
|
I dug into this and found the root cause. TL;DR: upgrade docling-parse to ≥ 7.12.0 ( What's happening. In docling-parse ≤ 7.11, every page decode constructs seven internal cell containers, and each constructor did That also explains the randomness: whether a run fails depends on what else is committed on the machine at that instant — same file, same command, different outcome. And once the machine is under commit pressure, every subsequent run fails too, which matches the "one fails, then everything fails" pattern you described. This was fixed upstream in docling-parse#311 (released in v7.12.0 on 2026-08-08 — a few days ago). Verification (Windows 11 build 26200, same docling versions as yours, process commit capped via a Job Object at model-load + 500 MB to simulate a machine under memory pressure):
Isolated, the per-page decode peak drops from ~2.2 GB to ~69 MB. Still worth doing on a constrained Windows box:
|
Uh oh!
There was an error while loading. Please reload this page.
I keep getting this memory error for bad_alloc. THis occurs at random for the same file at random times. For the same file, it occurs some times and does not occur some other times. I am runng docling -v -vv input.pdf outputDir
Here is a part of the error messages I am getting:
2026-07-19 21:19:03,467 DEBUG httpcore.http11: receive_response_body.complete
2026-07-19 21:19:03,467 DEBUG httpcore.http11: response_closed.started
2026-07-19 21:19:03,467 DEBUG httpcore.http11: response_closed.complete
2026-07-19 21:19:03,542 INFO docling.utils.accelerator_utils: Accelerator device: 'cpu'
2026-07-19 21:19:05,042 INFO docling.pipeline.base_pipeline: Processing document embedded-images-tables.pdf
2026-07-19 21:19:05,112 DEBUG pypdfium2._lazy: Evaluating lazy import 'PIL.Image' ...
2026-07-19 21:19:06,287 ERROR docling.pipeline.standard_pdf_pipeline: Stage preprocess failed for run 1, pages [1]: std::bad_alloc
2026-07-19 21:19:06,290 DEBUG docling.pipeline.standard_pdf_pipeline: Added 1 failed/skipped pages to document: [1]
2026-07-19 21:19:06,293 INFO docling.document_converter: Finished converting document embedded-images-tables.pdf in 7.24 sec.
2026-07-19 21:19:06,293 WARNING docling.cli.main: Document C:\Users\drera\AppData\Local\Temp\tmp06ccej_3\embedded-images-tables.pdf failed to convert.
2026-07-19 21:19:06,293 INFO docling.cli.main: [Failure Detail] Component: DoclingComponentType.MODEL, Module: preprocess, Message: std::bad_alloc
2026-07-19 21:19:06,293 INFO docling.cli.main: Processed 1 docs, of which 1 failed
2026-07-19 21:19:06,300 INFO docling.cli.main: All documents were converted in 7.25 seconds.
Is there some setting that can be altered for this to be corrected?
All reactions