Local PDF parsing hits memory errors on longer research papers
A local Docling parsing pipeline failed during preprocessing when research-paper PDFs were longer than 25 pages. The failures appeared on pages 25 to 28 and showed the error std::bad_alloc. The machine had an RTX 4060 with 8GB of , 16GB of RAM, and an i5-12450HX .
During the run, GPU use was around 95% and RAM use was around 80%, with about 3GB of RAM still available. Splitting PDFs into 20-page chunks allowed processing to continue, but 30 PDFs still took about 45 minutes.
Key points
- Docling preprocessing failed on research PDFs longer than 25 pages.
- The error was std::bad_alloc, which often points to a memory allocation failure.
- The laptop still showed some free RAM, but GPU and RAM usage were already high.
- Splitting PDFs into 20-page chunks worked, but 30 PDFs took about 45 minutes.
- can become a real time and hardware cost in AI agent systems.