Same issue with 5.1.2. Heap consumed by org.hibernate.internal.SessionFactoryImpl. Anyone found a workaround for the problem till the bug is fixed ?