I have an application that runs on Amazon EC2 (using several AWS products such as S3, DynamoDB, etc.) and has a memory leak. I collected some heap dumps and ran them through Eclipse's Memory Analyzer Tool, which pinpointed several hundred instances of sun.security.ssl.SSLSocketImpl
(taking up dozens of MB of memory) as probable leaks.
I'm having trouble however figuring out why these SSLSocketImpl
objects haven't been disposed of.
most instances of SSLSocketImpl
in the dumps have two references, one from java.lang.ref.Finalizer
, and one from com.amazonaws.internal.SdkSSLSocket
. the Finalizer thread in my heap dump is reported as idle, with no objects awaiting finalization. but the com.amazonaws.internal.SdkSSLSocket
objects that have references to the leaked SSLSocketImpl
objects seem to have been cleaned up. at least, I can't find them in the heap dump (Dominator view in MAT).
I'm new to analyzing java heap dumps. what should I look for next? if the Amazon SdkSSLSocket
objects have indeed been cleaned up, why weren't the SSLSocketImpl
objects also cleaned up?
thanks!