diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/HealthCheckServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/HealthCheckServiceCEImpl.java index ead2be857a..792fc42da0 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/HealthCheckServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/HealthCheckServiceCEImpl.java @@ -35,16 +35,20 @@ public class HealthCheckServiceCEImpl implements HealthCheckServiceCE { @Override public Mono getRedisHealth() { - Function healthTimeout = error -> new AppsmithException( - AppsmithError.HEALTHCHECK_TIMEOUT, "Redis"); + Function healthTimeout = error -> { + log.warn("Redis health check timed out: ", error.getMessage()); + return new AppsmithException(AppsmithError.HEALTHCHECK_TIMEOUT, "Redis"); + }; RedisReactiveHealthIndicator redisReactiveHealthIndicator = new RedisReactiveHealthIndicator(reactiveRedisConnectionFactory); return redisReactiveHealthIndicator.health().timeout(Duration.ofSeconds(3)).onErrorMap(TimeoutException.class, healthTimeout); } @Override public Mono getMongoHealth() { - Function healthTimeout = error -> new AppsmithException( - AppsmithError.HEALTHCHECK_TIMEOUT, "Mongo"); + Function healthTimeout = error -> { + log.warn("MongoDB health check timed out: ", error.getMessage()); + return new AppsmithException(AppsmithError.HEALTHCHECK_TIMEOUT, "Mongo"); + }; MongoReactiveHealthIndicator mongoReactiveHealthIndicator = new MongoReactiveHealthIndicator(reactiveMongoTemplate); return mongoReactiveHealthIndicator.health().timeout(Duration.ofSeconds(1)).onErrorMap(TimeoutException.class, healthTimeout); }