title: What could be the reason for hibernate transaction commit taking 10 seconds with 100% CPU utilization for every batch?
body: <p>We are having this issue with our Spring Hibernate JPA web application. We are uploading excel 3000 records using Apache POI into MYSQL. Commit frequency is 10 records, but each commit takes 10 seconds pause and CPU reaches almost 100% throughout the import process. I'm suspecting if there is a memory leak in session(cache) objects. But there is enough space in the young, old and permanent generations of the Java heap. What could be the possible issue? Is there any tools to profile whats happening at the time of commit? Please advise. </p>