Make timeout configurable

Created on 25 May 2023, over 1 year ago
Updated 3 September 2024, 26 days ago

Problem/Motivation

I have a few pretty large PDFs that run into a timeout in the stock config.

Steps to reproduce

Try to index a large PDF that takes longer than 1 minute to process.

Proposed resolution

If I apply the following patch, the extraction finishes successfully.

--- src/Plugin/file_extractor/Extractor/PdftotextExtractor.php.orig	2023-05-25 10:27:15.691344396 +0200
+++ src/Plugin/file_extractor/Extractor/PdftotextExtractor.php	2023-05-25 09:46:43.684141597 +0200
@@ -88,6 +88,7 @@
     ];
     $env_variables = ['LANG' => $this->getUtf8Locale()];
     $extraction_process = new Process($process_arguments, NULL, $env_variables);
+    $extraction_process->setTimeout(180);
     $extraction_process->run();

     if (!$extraction_process->isSuccessful()) {

This should however be configurable, I guess.

User interface changes

Probably add a config option to change this dynamically.

Feature request
Status

Needs review

Version

4.1

Component

Code

Created by

🇦🇹Austria tgoeg

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024