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

tballison pushed a commit to branch TIKA-4863-omp-thread-limit
in repository https://gitbox.apache.org/repos/asf/tika.git

commit 584b0e6c77717012fd03cc27c37823ff9c56e57b
Author: tallison <[email protected]>
AuthorDate: Mon Aug 31 08:59:08 2026 -0400

    TIKA-4863 - omp thread limit
---
 CHANGES.txt                                       | 6 ++++++
 tika-grpc/docker-build/Dockerfile                 | 2 ++
 tika-server/docker-build/full/Dockerfile          | 2 ++
 tika-server/docker-build/full/Dockerfile.snapshot | 2 ++
 4 files changed, 12 insertions(+)

diff --git a/CHANGES.txt b/CHANGES.txt
index ce09fe0392..cfc2c66ea6 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,11 @@
 Release 4.1.0 - unreleased
 
+   * The tika-server full and tika-grpc Docker images set OMP_THREAD_LIMIT=1:
+     the distro tesseract links OpenMP and runs up to 4 threads per OCR
+     process, which oversubscribes the CPU under forked parse workers;
+     single-threaded tesseract with process-level parallelism is the
+     tesseract project's guidance for servers (TIKA-XXXX).
+
    * embedded-limits maxDepth counts embedding levels again instead of the
      parsers a parse passes through; with AutoDetectParser over DefaultParser
      every value above 1 used to stop one level early (TIKA-4857).
diff --git a/tika-grpc/docker-build/Dockerfile 
b/tika-grpc/docker-build/Dockerfile
index 1a19270261..73e2a5986d 100644
--- a/tika-grpc/docker-build/Dockerfile
+++ b/tika-grpc/docker-build/Dockerfile
@@ -56,6 +56,8 @@ USER $UID_GID
 
 EXPOSE 9090
 ENV TIKA_VERSION=$VERSION
+# tesseract links libgomp; one thread per OCR process - parallelism comes from 
the forked parse workers
+ENV OMP_THREAD_LIMIT=1
 ENV TIKA_GRPC_MAX_INBOUND_MESSAGE_SIZE=$TIKA_GRPC_MAX_INBOUND_MESSAGE_SIZE
 ENV TIKA_GRPC_MAX_OUTBOUND_MESSAGE_SIZE=$TIKA_GRPC_MAX_OUTBOUND_MESSAGE_SIZE
 ENV TIKA_GRPC_NUM_THREADS=$TIKA_GRPC_NUM_THREADS
diff --git a/tika-server/docker-build/full/Dockerfile 
b/tika-server/docker-build/full/Dockerfile
index 722b22aab2..15f9f276ed 100644
--- a/tika-server/docker-build/full/Dockerfile
+++ b/tika-server/docker-build/full/Dockerfile
@@ -73,6 +73,8 @@ RUN set -eux \
     && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
 ARG TIKA_VERSION
 ENV TIKA_VERSION=$TIKA_VERSION
+# tesseract links libgomp; one thread per OCR process - parallelism comes from 
the forked parse workers
+ENV OMP_THREAD_LIMIT=1
 
 COPY --from=fetch_tika /opt/tika-server /opt/tika-server
 # WORKDIR sets the CWD so tika-server's plugin-root fallback resolves
diff --git a/tika-server/docker-build/full/Dockerfile.snapshot 
b/tika-server/docker-build/full/Dockerfile.snapshot
index 5dc5dd253a..0df341cd30 100644
--- a/tika-server/docker-build/full/Dockerfile.snapshot
+++ b/tika-server/docker-build/full/Dockerfile.snapshot
@@ -44,6 +44,8 @@ RUN set -eux \
     && apt-get clean -y \
     && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
 ENV TIKA_VERSION=$TIKA_VERSION
+# tesseract links libgomp; one thread per OCR process - parallelism comes from 
the forked parse workers
+ENV OMP_THREAD_LIMIT=1
 # Snapshot workflow tars the bin distribution into <context>/tika-server/, so
 # this COPY lands the thin jar + lib/ + plugins/ at /opt/tika-server/, matching
 # the release-variant Dockerfile.

Reply via email to