In start my application with hibernate using 300-400 mb ram. But then usage of RAM increases and does not decrease until it takes up the entire free RAM.
I tried to do
EntityManager#flush();
EntityManager#clear();
EntityManagerFactory#getCache().evictAll()
But it does not helped me. How can I decrease a RAM usage?