Netflix / archaius

Library for configuration management API
Apache License 2.0
2.46k stars 485 forks source link

young gc long time and Out-of-heap memory leak #727

Closed xianfengxiong closed 1 month ago

xianfengxiong commented 3 months ago

archaius-core: 0.6.6 version : 0.6.6

when i use spring-cloud-starter-openfeign:2.0.2.RELEASE, found young gc take a long time, and slow out-of-heap memory leak!

image

analyse dump file, fund the Inflater object too many OQL: SELECT classof(f.referent).@name FROM java.lang.ref.Finalizer f WHERE (f.referent != null)

image

use jmap -histo 1 | grep 'Inflater', fund this object slow increase image

at last, i foud the cause is "pollingConfigurationSource" ScheduledThreadPool execute task every 60 seconds, the task is URLConfigurationSource.poll(), the task will invoke url.openStream() method, the url is config.properties file by default, url.openStream() will new Inflater object.

I didn't know I was using it wrong or a bug ?

rgallardo-netflix commented 1 month ago

You are using very old versions of archaius (and of spring-cloud-starter-openfeign, for that matter). Archaius 1 is deprecated and we will not be fixing any hard-to-reproduce bugs such as this one. If you have a simpler test case we may consider a fix.