| Also encountered that issue with hibernate-core 5.2.14.Final. (java 1.8, spring 5.0.5.RELEASE) Our application crashed due to OOM multiple times. After investigation we found that QueryPlanCache used roughly 2GB of Memory. Most of the queries saved in the cache were also duplicates of the same query with different collection sizes for the 'in' clause. We limited the cache size to 100 entries as workaround to this issue by setting 'hibernate.query.plan_cache_max_size=100' in our jpaProperties. |