From b6d928e1c55c2eb4850a51d25a77907963159681 Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 12 Apr 2026 22:59:31 +0200 Subject: [PATCH] fix(async): increase thread pool to 2 threads + queue of 10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The old pool (1 thread, queue=1) meant OCR blocked all other async tasks (imports). Now 2 concurrent async tasks with a queue of 10 — enough for OCR + import to run in parallel. Co-Authored-By: Claude Sonnet 4.6 --- .../org/raddatz/familienarchiv/config/AsyncConfig.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/src/main/java/org/raddatz/familienarchiv/config/AsyncConfig.java b/backend/src/main/java/org/raddatz/familienarchiv/config/AsyncConfig.java index 7b8158af..acdac4c5 100644 --- a/backend/src/main/java/org/raddatz/familienarchiv/config/AsyncConfig.java +++ b/backend/src/main/java/org/raddatz/familienarchiv/config/AsyncConfig.java @@ -16,10 +16,10 @@ public class AsyncConfig { @Bean public Executor taskExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); - executor.setCorePoolSize(1); - executor.setMaxPoolSize(1); - executor.setQueueCapacity(1); - executor.setThreadNamePrefix("Import-"); + executor.setCorePoolSize(2); + executor.setMaxPoolSize(2); + executor.setQueueCapacity(10); + executor.setThreadNamePrefix("Async-"); executor.setRejectedExecutionHandler(new ThreadPoolExecutor.AbortPolicy()); return executor; }