From 4d303026208e7e8b622e1dbb6425596ecc15c858 Mon Sep 17 00:00:00 2001 From: zhou-yinyuan Date: Sat, 12 Oct 2024 11:15:17 +0800 Subject: [PATCH] [backend]: adjust the thread pool --- backend/src/main/java/heartbeat/config/ThreadPoolConfig.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/heartbeat/config/ThreadPoolConfig.java b/backend/src/main/java/heartbeat/config/ThreadPoolConfig.java index 2bdb8e8ff..780eecb28 100644 --- a/backend/src/main/java/heartbeat/config/ThreadPoolConfig.java +++ b/backend/src/main/java/heartbeat/config/ThreadPoolConfig.java @@ -13,8 +13,8 @@ public class ThreadPoolConfig { public ThreadPoolTaskExecutor taskExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); - executor.setCorePoolSize(40); - executor.setMaxPoolSize(200); + executor.setCorePoolSize(20); + executor.setMaxPoolSize(100); executor.setQueueCapacity(1000); executor.setKeepAliveSeconds(60); executor.setThreadNamePrefix("Heartbeat-");