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

tballison pushed a commit to branch TIKA-4809-stage-1
in repository https://gitbox.apache.org/repos/asf/tika.git

commit d13373d9e786bd7acd3170fe4ef14fa9e585eff8
Author: tallison <[email protected]>
AuthorDate: Fri Aug 7 10:39:58 2026 -0400

    TIKA-4809: Remove vestigial -spawnChild-era CLI options and config fields
---
 .../apache/tika/server/core/TikaServerConfig.java  |  9 -------
 .../apache/tika/server/core/TikaServerProcess.java |  5 ----
 .../main/resources/tika-server-config-default.xml  | 31 +++-------------------
 .../configs/tika-config-timeout-100ms.json         | 12 ---------
 .../configs/tika-config-with-timeout.json          | 14 ----------
 .../tika/server/standard/TikaResourceTest.java     |  1 -
 6 files changed, 3 insertions(+), 69 deletions(-)

diff --git 
a/tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/TikaServerConfig.java
 
b/tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/TikaServerConfig.java
index d4b22726cd..69f30fced8 100644
--- 
a/tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/TikaServerConfig.java
+++ 
b/tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/TikaServerConfig.java
@@ -40,13 +40,7 @@ public class TikaServerConfig {
     public static final int DEFAULT_PORT = 9998;
     public static final String DEFAULT_HOST = "localhost";
     public static final Set<String> LOG_LEVELS = new 
HashSet<>(Arrays.asList("debug", "info"));
-    /**
-     * Number of milliseconds to wait for forked process to startup
-     */
-    public static final long DEFAULT_FORKED_STARTUP_MILLIS = 120000;
     private static final Logger LOG = 
LoggerFactory.getLogger(TikaServerConfig.class);
-    //used in fork mode -- restart after processing this many files
-    private static final long DEFAULT_MAX_FILES = 100000;
     private static final int DEFAULT_DIGEST_MARK_LIMIT = 20 * 1024 * 1024;
     /**
      * Endpoints that expose the pipes/fetch machinery (process-isolated pipes
@@ -58,9 +52,6 @@ public class TikaServerConfig {
      */
     private static final Set<String> ENDPOINTS_REQUIRING_PIPES =
             new HashSet<>(Arrays.asList("pipes", "async"));
-    private static final List<String> ONLY_IN_FORK_MODE = Arrays.asList(
-            new String[]{"maxFiles", "javaPath", "maxRestarts", "numRestarts", 
"forkedStatusFile", "maxForkedStartupMillis",
-                    "tmpFilePrefix"});
     private static Pattern SYS_PROPS = 
Pattern.compile("\\$\\{sys:([-_0-9A-Za-z]+)\\}");
     /*
 TODO: integrate these settings:
diff --git 
a/tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/TikaServerProcess.java
 
b/tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/TikaServerProcess.java
index 422cbe05f8..ea569bceb1 100644
--- 
a/tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/TikaServerProcess.java
+++ 
b/tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/TikaServerProcess.java
@@ -113,11 +113,6 @@ public class TikaServerProcess {
         options.addOption("a", "pluginsConfig", true, "Tika Configuration json 
for pluginscomponents");
         options.addOption("i", "id", true, "id to use for server in server 
status endpoint");
         options.addOption("?", "help", false, "this help message");
-        options.addOption("noFork", "noFork", false, "if launched in no fork 
mode");
-        options.addOption("forkedStatusFile", true,
-                "Not allowed in -noFork: temporary file used to communicate " 
+ "with forking process -- do not use this! " + "Should only be invoked by 
forking process.");
-        options.addOption("tmpFilePrefix", true, "Not allowed in -noFork: 
prefix for temp file - for debugging only");
-        options.addOption("numRestarts", true, "Not allowed in -noFork: number 
of times that " + "the forked server has had to be restarted.");
         return options;
     }
 
diff --git 
a/tika-server/tika-server-core/src/main/resources/tika-server-config-default.xml
 
b/tika-server/tika-server-core/src/main/resources/tika-server-config-default.xml
index f2e0149fd0..ce8fca1962 100644
--- 
a/tika-server/tika-server-core/src/main/resources/tika-server-config-default.xml
+++ 
b/tika-server/tika-server-core/src/main/resources/tika-server-config-default.xml
@@ -47,34 +47,9 @@
       <!-- whether or not to include the stacktrace when a parse exception 
happens
           in the data returned to the user -->
       <returnStackTrace>false</returnStackTrace>
-      <!-- If set to 'true', this runs tika server "in process"
-          in the legacy 1.x mode.
-          This means that the server will be susceptible to infinite loops
-          and crashes.
-          If set to 'false', the server will spawn a forked
-          process and restart the forked process on catastrophic failures
-          (this was called -spawnChild mode in 1.x).
-          nofork=false is the default in 2.x
-      -->
-      <noFork>false</noFork>
-      <!-- maximum amount of time to wait for a forked process to
-          start up.
-          Not allowed if nofork=true. -->
-      <maxForkedStartupMillis>120000</maxForkedStartupMillis>
-      <!-- maximum number of times to allow a specific forked process
-          to be restarted.
-          Not allowed if nofork=true. -->
-      <maxRestarts>-1</maxRestarts>
-      <!-- maximum files to parse per forked process before
-          restarting the forked process to clear potential
-          memory leaks.
-          Not allowed if nofork=true. -->
-      <maxFiles>100000</maxFiles>
-      <!-- if you want to specify a specific javaPath for
-          the forked process.  This should be the full path
-          including the executable, e.g.: /usr/bin/java
-          Not allowed if nofork=true. -->
-      <javaPath>java</javaPath>
+      <!-- Per-document process isolation, crash restart, and timeouts are
+          configured via the pipes section (pipes.forkedJvmArgs,
+          pipes.numClients) and parse-context.timeout-limits, not here. -->
     </params>
   </server>
 </properties>
diff --git 
a/tika-server/tika-server-core/src/test/resources/configs/tika-config-timeout-100ms.json
 
b/tika-server/tika-server-core/src/test/resources/configs/tika-config-timeout-100ms.json
deleted file mode 100644
index c0534fe6d6..0000000000
--- 
a/tika-server/tika-server-core/src/test/resources/configs/tika-config-timeout-100ms.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-  "server": {
-    "allowPipes": true,
-    "allowPerRequestConfig": true,
-    "enableLogFile": true
-  },
-  "parse-context": {
-    "timeout-limits": {
-      "progressTimeoutMillis": 100
-    }
-  }
-}
diff --git 
a/tika-server/tika-server-core/src/test/resources/configs/tika-config-with-timeout.json
 
b/tika-server/tika-server-core/src/test/resources/configs/tika-config-with-timeout.json
deleted file mode 100644
index 540b69f8f0..0000000000
--- 
a/tika-server/tika-server-core/src/test/resources/configs/tika-config-with-timeout.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
-  "parsers": [
-    {
-      "pdf-parser": {
-        "extractInlineImages": true
-      }
-    }
-  ],
-  "parse-context": {
-    "timeout-limits": {
-      "progressTimeoutMillis": 30000
-    }
-  }
-}
diff --git 
a/tika-server/tika-server-standard/src/test/java/org/apache/tika/server/standard/TikaResourceTest.java
 
b/tika-server/tika-server-standard/src/test/java/org/apache/tika/server/standard/TikaResourceTest.java
index 8c2d954bf9..fce1711635 100644
--- 
a/tika-server/tika-server-standard/src/test/java/org/apache/tika/server/standard/TikaResourceTest.java
+++ 
b/tika-server/tika-server-standard/src/test/java/org/apache/tika/server/standard/TikaResourceTest.java
@@ -62,7 +62,6 @@ public class TikaResourceTest extends CXFTestBase {
     public static final String TEST_DOC = "test-documents/test.doc";
     public static final String TEST_PASSWORD_PROTECTED = 
"test-documents/password.xls";
     private static final String TEST_RECURSIVE_DOC = 
"test-documents/test_recursive_embedded.docx";
-    private static final String TEST_OOM = "mock/fake_oom.xml";
 
     private static final String TIKA_PATH = "/tika";
     private static final int UNPROCESSEABLE = 422;

Reply via email to