[
https://issues.apache.org/jira/browse/TIKA-4813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18103719#comment-18103719
]
ASF GitHub Bot commented on TIKA-4813:
--------------------------------------
tballison merged PR #3005:
URL: https://github.com/apache/tika/pull/3005
> Clean up timeout logic in 4.x
> -----------------------------
>
> Key: TIKA-4813
> URL: https://issues.apache.org/jira/browse/TIKA-4813
> Project: Tika
> Issue Type: Task
> Reporter: Tim Allison
> Priority: Minor
>
> Problem: Tika's timeout system was three incoherent knobs. A parser's own
> configured timeout got overwritten by an unrelated stall-detector setting.
> Timeouts couldn't compose across nesting (PDF → zip → OCR). A single
> timed-out subprocess could kill the whole worker JVM instead of just failing
> that one document.
> Proposal: every external call gets min(what it asked for, time left on the
> task). ParseTimeout (new, in tika-core) holds that remaining-time clock per
> task, shared automatically across
> recursion. ProcessUtils/TikaHttpClient apply the rule internally and
> checkpoint the clock while waiting, so a legitimately slow call doesn't look
> like a hang. TikaTimeoutException is now catchable (was an uncaught
> RuntimeException), so one slow embedded file gets recorded and skipped
> instead of aborting the whole document; running out of total time now
> truncates cleanly instead of crashing the JVM.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)