docling-project / docling-project/docling
Docling hangs with enrich formula and document timeout
- Dominant language
- Python
- Stars
- 66.4k
- Forks
- 4.8k
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 95
Description
### Bug
Docling hangs with some PDF documents with `do_formula_enrichment=True` after the execution was aborted with by the document timeout:
```
2025-10-16 13:07:08,746 - INFO - Loading plugin 'docling_defaults'
2025-10-16 13:07:08,759 - INFO - Registered ocr engines: ['easyocr', 'ocrmac', 'rapidocr', 'tesserocr', 'tesseract']
2025-10-16 13:07:12,402 - INFO - paths: [WindowsPath('C:/Users/lb/AppData/Local/Temp/tmpzs2tfimf/1-s2.0-S0963869523002086-main.pdf')]
2025-10-16 13:07:12,404 - INFO - detected formats: []
2025-10-16 13:07:13,251 - INFO - Going to convert document batch...
2025-10-16 13:07:13,252 - INFO - Initializing pipeline for StandardPdfPipeline with options hash 16773cf0d1ad6514cb4bd739bcb17c35
2025-10-16 13:07:13,437 - INFO - Loading plugin 'docling_defaults'
2025-10-16 13:07:13,440 - INFO - Registered picture descriptions: ['vlm', 'api']
2025-10-16 13:07:13,761 - INFO - Accelerator device: 'cpu'
2025-10-16 13:07:15,603 - INFO - Accelerator device: 'cpu'
2025-10-16 13:07:17,409 - INFO - Accelerator device: 'cpu'
2025-10-16 13:07:17,812 - INFO - Accelerator device: 'cpu'
2025-10-16 13:07:19,348 - INFO - Processing document 1-s2.0-S0963869523002086-main.pdf
2025-10-16 13:08:31,509 - WARNING - Document processing time (72.160 seconds) exceeded the specified timeout of 60.000 seconds
2025-10-16 13:08:31,509 - INFO - Filtered out 1 uninitialized pages due to timeout or processing failures
-- HANGS HERE --
```
Example PDF: https://www.ndt.net/article/ndt-e-intl/papers/1-s2.0-S0963869523002086-main.pdf
### Steps to reproduce
```shell
docling --from pdf --to md --document-timeout 60 --enrich-formula -vv "https://www.ndt.net/article/ndt-e-intl/papers/1-s2.0-S0963869523002086-main.pdf"
```
### Docling version
Docling version: 2.53.0
Docling Core version: 2.48.2
Docling IBM Models version: 3.9.1
Docling Parse version: 4.5.0
Python: cpython-313 (3.13.7)
Platform: Windows-11-10.0.26100-SP0
### Python version
Python 3.13.7
Contributor guide
Research direction
Start by reproducing the documented CLI command with the example PDF, --document-timeout 60, and --enrich-formula. Trace what happens after the timeout warning and the uninitialized page is filtered; done means the command exits without hanging while preserving timeout behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100