diff --git a/src/main/kotlin/io/emeraldpay/dshackle/Starter.kt b/src/main/kotlin/io/emeraldpay/dshackle/Starter.kt index d63abfb5..5ff00f5a 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/Starter.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/Starter.kt @@ -17,6 +17,7 @@ package io.emeraldpay.dshackle import io.netty.handler.ssl.OpenSsl +import io.netty.util.ResourceLeakDetector import org.slf4j.LoggerFactory import org.springframework.boot.ResourceBanner import org.springframework.boot.SpringApplication @@ -37,6 +38,8 @@ fun main(args: Array) { HeapDumpCreator.init() + ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.ADVANCED) + val cores = Runtime.getRuntime().availableProcessors() val maxMemory: Long = Runtime.getRuntime().maxMemory() / (1024 * 1024).toLong() log.info("Max heap size: {} MB, number of cores: {}", maxMemory, cores)