From d97281233f76b25b848691188d7e699d9b85ac6f Mon Sep 17 00:00:00 2001 From: jeremy bayse Date: Wed, 24 Jun 2026 07:00:26 +0200 Subject: [PATCH] fix: increase process and php execution timeout during PDF ingestion with Vision AI --- app/Services/DocumentIngestionService.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/Services/DocumentIngestionService.php b/app/Services/DocumentIngestionService.php index b0d3975..b040f69 100644 --- a/app/Services/DocumentIngestionService.php +++ b/app/Services/DocumentIngestionService.php @@ -208,8 +208,11 @@ class DocumentIngestionService $mistralKey = config('services.mistral.key') ?? env('MISTRAL_API_KEY', ''); $visionFlag = $enableVision ? '1' : '0'; - // Run Python script - $result = Process::run([ + // Set execution time limit for PHP to 600 seconds + @set_time_limit(600); + + // Run Python script with a 600-second timeout + $result = Process::timeout(600)->run([ 'python', $scriptPath, $filePath,