I’m upgrading an old application based on Play 2.4 to 2.5, the first of many steps to get it to the latest Play version. After the upgrade, though, I’m noticing increased memory usage, growing over time until the JVM or the host system crashes.
I’ve tried every tool in my box to figure this out, without any luck. The worst part is that this leak from native or otherwise untracked memory. Memory profiling using YourKit shows mostly regular heap and non-heap memory pools, but the resident size of the process as reported by the OS grows until the kernel decides to kill it, or the whole system comes to a crawl. I’ve tried switching the JVM from OpenJDK to OpenJ9, but if this is a VM bug it’s shared by both implementations.
For example. Here the profiler is reporting 2.5G + 494MB allocated for heap and non-heap memory altogether:
top shows over 6.7G resident size.
It just gets worse over time until the process or the whole system becomes unresponsive.
Has anyone here seen anything like that, or has any advice to help me figure out where that memory usage is coming from?
- Play 2.5.19 (Akka 2.4.20)
- Java 8u212 (tried on both Amazon Corretto and AdoptOpenJDK OpenJ9)
- Linux 3.13.0 (on AWS EC2; m4.large instance)