Are there MySQL versions which are more robust and suitable for a multi-threaded Java EE, Hibernate and Ehcache application? The Servletcontainer is Jetty.
Right now I think we're using MySQL v5.1.50 under FreeBSD and I'm getting:
************************************************** ******************************
************************************************** ******************************
************************************************** ******************************
************************************************** ******************************
2011-09-05 16:55:18,350 WARN [org.hibernate.util.JDBCExceptionReporter] - <SQL Error: 1205, SQLState: 41000>
2011-09-05 16:55:18,350 ERROR [org.hibernate.util.JDBCExceptionReporter] - <Lock wait timeout exceeded; try restarting transaction>
2011-09-05 16:55:18,352 ERROR [org.hibernate.event.def.AbstractFlushingEventListe ner] - <Could not synchronize database state with session>
org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.handledN onSpecificException(SQLStateConverter.java:126)
at org.hibernate.exception.SQLStateConverter.convert( SQLStateConverter.java:114)
at org.hibernate.exception.JDBCExceptionHelper.conver t(JDBCExceptionHelper.java:66)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(Ab stractBatcher.java:275)
at org.hibernate.engine.ActionQueue.executeActions(Ac tionQueue.java:266)
at org.hibernate.engine.ActionQueue.executeActions(Ac tionQueue.java:168)
at org.hibernate.event.def.AbstractFlushingEventListe ner.performExecutions(AbstractFlushingEventListene r.java:321)
at org.hibernate.event.def.DefaultFlushEventListener. onFlush(DefaultFlushEventListener.java:50)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.j ava:1027)
at org.hibernate.ejb.AbstractEntityManagerImpl.flush( AbstractEntityManagerImpl.java:304)
at sun.reflect.GeneratedMethodAccessor27.invoke(Unkno wn Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.orm.jpa.SharedEntityManagerCre ator$SharedEntityManagerInvocationHandler.invoke(S haredEntityManagerCreator.java:198)
at $Proxy38.flush(Unknown Source)
************************************************** ****************************
************************************************** ****************************
************************************************** ****************************
************************************************** ****************************
AND
2011-06-23 11:19:25,910 ERROR [org.hibernate.util.JDBCExceptionReporter] - <Column 'campaign_contract_id' cannot be null>
2011-06-23 11:19:25,967 ERROR [adx.main] - <Stats job failed for >
javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationExcepti on: Could not execute JDBC batch update
at org.hibernate.ejb.AbstractEntityManagerImpl.throwP ersistenceException(AbstractEntityManagerImpl.java :614)
at org.hibernate.ejb.AbstractEntityManagerImpl.persis t(AbstractEntityManagerImpl.java:226)
at sun.reflect.GeneratedMethodAccessor63.invoke(Unkno wn Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.orm.jpa.SharedEntityManagerCre ator$SharedEntityManagerInvocationHandler.invoke(S haredEntityManagerCreator.java:198)
at $Proxy37.persist(Unknown Source)
************************************************** ******************************
************************************************** ******************************
************************************************** ******************************
************************************************** ******************************
Every now and then and I'm having to restart the mysql server. That used to fix it. But now I'm getting more and more of it. A cell in the database gets corrupt and merely trying to alter the contents of that row it in PhpMyAdmin doesn't work. It tries for a long time and then exits with an errormessage. After a restart of the mysql-server it usually works. Now I'm getting more and more of these incidents. Now even the single threaded Java EE servlet are experiencing these problems. We have 2 different physical servers running Java EE Webapplications against the same MySQL server. Synchronization in the sense of one Hibernate cache not knowing that a row has been modified by the other Java server or PHP has not been an issue. A dirty flag is set and everyone knows that the row is dirty.
Will upgrading to MySQL v5.5 solve these problems? Or are there other more robust versions of MySQL?


Reply With Quote