I have application running on HotSpot jvm 1.8.0_45 with well packed 8GB heap. Application tries to allocate memory for new objects fails with heap space OOM error. I have looked at heap dump and found that most part of space are occupied by charBufferCaches of T4CConnection instances. This caches hold SoftReferences for char arrays. I was surprised that SoftReferences was not released before OOM. I double checked if there is a hard references for this arrays but didn't found one.
Why do I have heap space OOM when application hold 3GB of char arrays by SoftReferences? Why this SoftReferences not released when application need new memory?
Part of T4CConnection object showing charBufferCache:
Incoming references for char array holded at T4CConnection charBufferCache: