diff --git a/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java b/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java index 5b5e17a34b..2a61e8880d 100644 --- a/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java +++ b/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java @@ -150,7 +150,7 @@ public class JMeterService { } } - private void send(JmeterRunRequestDTO request) { + private synchronized void send(JmeterRunRequestDTO request) { try { if (redisTemplate.opsForValue().get(SmoothWeighted.EXEC_INDEX + request.getPoolId()) != null) { long index = Long.parseLong(redisTemplate.opsForValue().get(SmoothWeighted.EXEC_INDEX + request.getPoolId()).toString()); diff --git a/backend/src/main/java/io/metersphere/config/WebConfig.java b/backend/src/main/java/io/metersphere/config/WebConfig.java index d824b9894b..6a78dbc3f7 100644 --- a/backend/src/main/java/io/metersphere/config/WebConfig.java +++ b/backend/src/main/java/io/metersphere/config/WebConfig.java @@ -35,7 +35,7 @@ public class WebConfig implements WebMvcConfigurer { private final static int MAX_PER_ROUTE = 500; private final static int CONN_REQUEST_TIMEOUT = 5000; private final static int CONNECT_TIMEOUT = 8000; - private final static int SOCKET_TIMEOUT = 10 * 1000; + private final static int SOCKET_TIMEOUT = 20 * 1000; @Bean public RestTemplate restTemplate() {