-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
13.0.8.Final
-
None
We use infinispan as our hibernate cache provider in a large scale clustered web app (servicing thousands of HTTP requests per second) and have been doing so for a number of years.
We only recently introduced a natural id cache for one hibernate entity type that is very heavily used in our system. Since doing so we observe a steady memory leak in the JVM Old Gen heap - it changes as our load changes throughout the day but roughly gigabyte every 4 hours.
We took a heap dump and upon inspecting it appears the suspect is the pendingPuts map in the PutFromLoadValidator. We see it retaining thousands of references to hibernate sessions (in the nested PendingPutMap data structure) that have long since been closed. Unfortunately despite the sessions being closed they still retain a reference to old database connections, which each have non trivial amounts of memory allocated for statement caches and the like.