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,