-
Notifications
You must be signed in to change notification settings - Fork 89
Description
Describe the bug
In my spring boot application I use kafka and springwolf. After changing message serialization from json to protobuf the app consumes all memory assigned to java process.
After the analysis the cause is springwolf library. Using springwolf.enabled: false confirms the issue.
The memory consumption is significant. The app normally consumes up to 600MB (200MB after GC). But now it's 4.5GB (everything assigned to java process) within 1-2 minutes. The app consumes 95-100% of CPU time.
Dependencies and versions used
-
springwolf-kafkaversion1.15.0 -
springwolf-uiversion1.15.0
Code example
Configuration
springwolf:
docket:
base-package: com.company.msd
info:
title: ${spring.application.name}
version: 1.0.0
servers.kafka-server:
protocol: kafka
host: ${kafka.bootstrap.servers:localhost:29092}
plugin:
kafka:
publishing:
enabled: trueStack trace and error logs
All data are created after ~1minute of starting the app.
Attached histogram is created using jcmd $PID GC.class_histogram, thread dumps using kill -3 $PID.
develop-class-histogram.txt is created on branch without google protobuf and it's attached for comparison purpose.
protobuf-class-histogram12.txt
threaddump-1.txt
threaddump-2.txt
threaddump-3.txt
develop-class-histogram.txt