Hi there!

I'm currently trying to create a completely high available setup for the Hybris 
platform (http://hybris.com/). Hybris is a Spring-based framework for 
e-commerce sites, that is running on Tomcat and connecting via a JDBC pool to 
different databases, MySQL being one.

So I've set up two MySQL nodes using a Percona cluster and HAProxy on the 
application server node to proxy requests to one or both of the database nodes. 
(I've tried Active/Active and Active/Passive setups)

Everything works quite fine, but during the high-load initialization process, 
the JDBC connections in the pool somehow seem to timeout or loose connection to 
the databse. These exceptions pop up:

INFO   | jvm 1    | main    | 2014/10/14 15:59:45.361 | The last packet 
successfully received from the server was 59.601 milliseconds ago.  The last 
packet sent successfully to the server was 0 milliseconds ago.
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.361 |         at 
sun.reflect.GeneratedConstructorAccessor430.newInstance(Unknown Source)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.361 |         at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.361 |         at 
java.lang.reflect.Constructor.newInstance(Constructor.java:526)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.361 |         at 
com.mysql.jdbc.Util.handleNewInstance(Util.java:377)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.361 |         at 
com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1036)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.361 |         at 
com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3427)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.361 |         at 
com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3327)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.361 |         at 
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.361 |         at 
com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.361 |         at 
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.361 |         at 
com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2526)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.361 |         at 
com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:4842)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.361 |         at 
de.hybris.platform.jdbcwrapper.ConnectionImpl.doSetAutoCommit(ConnectionImpl.java:431)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.361 |         at 
de.hybris.platform.jdbcwrapper.ConnectionImpl.setTxBoundUserTA(ConnectionImpl.java:228)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.361 |         at 
de.hybris.platform.tx.Transaction.bindConnection(Transaction.java:578)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.361 |         at 
de.hybris.platform.tx.Transaction.beginOuter(Transaction.java:538)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.362 |         at 
de.hybris.platform.tx.Transaction.begin(Transaction.java:486)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.362 |         at 
de.hybris.platform.tx.Transaction.execute(Transaction.java:1190)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.362 |         at 
de.hybris.platform.tx.Transaction.execute(Transaction.java:1160)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.362 |         at 
de.hybris.platform.jalo.Item.setAllAttributes(Item.java:2059)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.362 |         at 
de.hybris.platform.jalo.Item.setAllAttributes(Item.java:2034)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.362 |         at 
de.hybris.platform.servicelayer.internal.converter.impl.ItemModelConverter.storeAttributes(ItemModelConverter.java:1402)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.362 |         at 
de.hybris.platform.servicelayer.internal.converter.impl.ItemModelConverter.save(ItemModelConverter.java:683)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.362 |         at 
de.hybris.platform.servicelayer.internal.model.impl.wrapper.ModelWrapper.save(ModelWrapper.java:336)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.362 |         at 
de.hybris.platform.servicelayer.internal.model.impl.ResolvingModelPersister.saveOthers(ResolvingModelPersister.java:64)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.362 |         at 
de.hybris.platform.servicelayer.internal.model.impl.ResolvingModelPersister.persist(ResolvingModelPersister.java:49)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.362 |         at 
de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.saveViaJalo(DefaultModelService.java:1059)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.362 |         at 
de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.doJaloPersistence(DefaultModelService.java:648)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.362 |         at 
de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.persistWrappers(DefaultModelService.java:1002)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.362 |         at 
de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.performPersistenceOperations(DefaultModelService.java:626)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.362 |         at 
de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.saveAllInternal(DefaultModelService.java:620)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.362 |         at 
de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.saveAll(DefaultModelService.java:600)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.362 |         at 
de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.save(DefaultModelService.java:548)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.362 |         at 
de.hybris.platform.servicelayer.cronjob.impl.DefaultTriggerService.setTimeOfNextOccurence(DefaultTriggerService.java:494)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.362 |         at 
de.hybris.platform.servicelayer.cronjob.impl.DefaultTriggerService.activateInternal(DefaultTriggerService.java:173)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.362 |         at 
de.hybris.platform.servicelayer.cronjob.impl.DefaultTriggerService.activate(DefaultTriggerService.java:134)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.362 |         at 
de.hybris.platform.cronjob.jalo.CronJobTimerTask.processTriggers(CronJobTimerTask.java:188)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.362 |         ... 4 more
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.362 | Caused by: 
java.io.EOFException: Can not read response from server. Expected to read 4 
bytes, read 0 bytes before connection was unexpectedly lost.
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.362 |         at 
com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2914)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.362 |         at 
com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3337)
INFO   | jvm 1    | main    | 2014/10/14 15:59:45.362 |         ... 35 more

I've been using version 1.4 from the Ubuntu repository and already updated to 
current 1.5, in which these exceptions come at a later point during the 
intialization process, however they still exist.

Can anybody help me here? How can I better debug this? Do you need any more 
data to help?

Thank you in advance.

Kind regards
Dennis

Reply via email to