This is an automated email from the ASF dual-hosted git repository.

janhoy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/main by this push:
     new 160076dad1a TikaServerExtractionBackend now sets idleTimeout (#3926)
160076dad1a is described below

commit 160076dad1a0d5b1866b7ed67115c58dc4905d63
Author: Jan Høydahl <[email protected]>
AuthorDate: Sat Dec 6 15:56:17 2025 +0100

    TikaServerExtractionBackend now sets idleTimeout (#3926)
---
 changelog/unreleased/tika-server-idle-timeout-fix.yml            | 9 +++++++++
 .../solr/handler/extraction/TikaServerExtractionBackend.java     | 2 ++
 2 files changed, 11 insertions(+)

diff --git a/changelog/unreleased/tika-server-idle-timeout-fix.yml 
b/changelog/unreleased/tika-server-idle-timeout-fix.yml
new file mode 100644
index 00000000000..36d2206609e
--- /dev/null
+++ b/changelog/unreleased/tika-server-idle-timeout-fix.yml
@@ -0,0 +1,9 @@
+# See https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc
+title: When using SolrCell with TikaServer, the connection will no longer 
timeout after 30s idle, such as during OCR processing
+type: fixed # added, changed, fixed, deprecated, removed, dependency_update, 
security, other
+authors:
+  - name: Jan Høydahl
+    url: https://home.apache.org/phonebook.html?uid=janhoy
+links:
+  - name: SOLR-XXXX
+    url: https://issues.apache.org/jira/browse/SOLR-XXXX
diff --git 
a/solr/modules/extraction/src/java/org/apache/solr/handler/extraction/TikaServerExtractionBackend.java
 
b/solr/modules/extraction/src/java/org/apache/solr/handler/extraction/TikaServerExtractionBackend.java
index 807e3305826..c21a0c01e09 100644
--- 
a/solr/modules/extraction/src/java/org/apache/solr/handler/extraction/TikaServerExtractionBackend.java
+++ 
b/solr/modules/extraction/src/java/org/apache/solr/handler/extraction/TikaServerExtractionBackend.java
@@ -180,6 +180,8 @@ public class TikaServerExtractionBackend implements 
ExtractionBackend {
             ? Duration.ofSeconds(request.tikaServerTimeoutSeconds)
             : defaultTimeout;
     req.timeout(effectiveTimeout.toMillis(), TimeUnit.MILLISECONDS);
+    // Also set idle timeout in case of heavy server side work like OCR
+    req.idleTimeout(effectiveTimeout.toMillis(), TimeUnit.MILLISECONDS);
 
     // Headers
     String accept = (request.tikaServerRecursive ? "application/json" : 
"text/xml");

Reply via email to