From 883b2d6c0778dfd3fc4efebfc9b5ccb27ce212ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominique=20Eifl=C3=A4nder?= Date: Tue, 4 Jun 2024 09:22:37 +0200 Subject: [PATCH] RED-8833: Increased MaxMetaspaceSize to 1g and decreased drools artefact caches --- .../redaction-service-server-v1/build.gradle.kts | 2 +- .../iqser/red/service/redaction/v1/server/Application.java | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/redaction-service-v1/redaction-service-server-v1/build.gradle.kts b/redaction-service-v1/redaction-service-server-v1/build.gradle.kts index 54c5aac3..4aa1625e 100644 --- a/redaction-service-v1/redaction-service-server-v1/build.gradle.kts +++ b/redaction-service-v1/redaction-service-server-v1/build.gradle.kts @@ -103,7 +103,7 @@ tasks.test { tasks.named("bootBuildImage") { environment.put("BPE_DELIM_JAVA_TOOL_OPTIONS", " ") - environment.put("BPE_APPEND_JAVA_TOOL_OPTIONS", "-XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8") + environment.put("BPE_APPEND_JAVA_TOOL_OPTIONS", "-XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8 -Dkie.repository.project.cache.size=50 -Dkie.repository.project.versions.cache.size=5") imageName.set("nexus.knecon.com:5001/red/${project.name}")// must build image with same name always, otherwise the builder will not know which image to use as cache. DO NOT CHANGE! if (project.hasProperty("buildbootDockerHostNetwork")) { diff --git a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/Application.java b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/Application.java index 09ba88b9..bc16b1b6 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/Application.java +++ b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/Application.java @@ -28,7 +28,9 @@ import io.micrometer.core.aop.TimedAspect; import io.micrometer.core.instrument.MeterRegistry; import io.micrometer.observation.ObservationRegistry; import io.micrometer.observation.aop.ObservedAspect; +import lombok.extern.slf4j.Slf4j; +@Slf4j @EnableCaching @ImportAutoConfiguration({MultiTenancyAutoConfiguration.class, SharedMongoAutoConfiguration.class}) @Import({MetricsConfiguration.class, StorageAutoConfiguration.class, MongoDatabaseCommonsAutoConfiguration.class}) @@ -41,6 +43,9 @@ public class Application { public static void main(String[] args) { + log.info("Drools in memory artefact cache is set to {}", System.getProperty("kie.repository.project.cache.size")); + log.info("Number of cached versions per artefact is set to {}", System.getProperty("kie.repository.project.versions.cache.size")); + System.setProperty("org.apache.pdfbox.rendering.UsePureJavaCMYKConversion", "true"); SpringApplication.run(Application.class, args); }