title: Web application with Hibernate, Spring and Oracle goes up to 99% of the CPU (row lock contentions)
body: <p>We have an web application in Linux environment that the CPU sometimes goes up to 99%.</p>
  
  <p>Sometimes it takes days, and other times it takes minutes. We are using Hibernate with Spring in a tomcat webapp and an Oracle Database.</p>
  
  <p>Checking the logs it appears the following:</p>
  
  <p>"ConnectionManager - transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!". </p>
  
  <p>And then the sessioncount starts to grow until 256 sessions (the max allowed by our Apache confs). This is the line that appears when the session count gets 256:</p>
  
  <p>"ContainerBackgroundProcessor[StandardEngine[Catalina]] ManagerBase - Start expire sessions StandardManager at 1259947978384 sessioncount 256"</p>
  
  <p>After that the CPU gets 99%.</p>
  
  <p>Any suggestions?  All will be HIGHLY appreciated.</p>
  
  <p>Thanks in advance.</p>
  
  <p>p.s. Sometime ago we have some similar problems with row lock contention. That's why we adopt Spring.</p>