EOFExceptions crippling large Java web app
jredden <[email protected]> Mon, 25 Aug 2008 10:50:45 -0700
| Newsgroups | gmane.comp.db.mysql.java |
|---|---|
| Organization | Matrix Consultants |
| Message-ID | <[email protected]> |
We have an application that was stable and did not have any serious
errors until April this year. Since that time we are seeing an
incresing number of EOFExceptions thrown by the JDBC driver. Sometimes
the web site will hang other times it will recover. When this problem
starting to become an issue we spent considerable time researcing the
web why this would happen. It seems that other sites that solved this
problem, always did it with a different set of changes to the jdbc
configuration. I tried a number of those, and none seems to have
significantly changed the behavior of our web application.
Any suggestions would be appreciated.
Configuration Details:
Single master and slave replicating server each running mysql Ver 14.12
Distrib 5.0.45, on Red Hat 4.1 Linux.
The same problem has appeared on our test/stage systems running Linux
CentOS 5. The kernel version is 2.6.18-8.1.8.el5 on both servers.
Most of the errors have been seen on the slave server running
resin-pro-3.1.3. Resin has been very stable up to this point.
Most of the propblems have been seen on the slave, but we have also seen
the problem on the master where mysql and an ecommerce java application
are running using Tomcat and not Resin. I don't believe replication or
resin or tomcat have to do with the issue we are seeing. The master and
slave server are in a data center with fast ethernet so I don't see
replication latency as an issue either (especially since we have also
seen the EOFException on the machine that also is running the dataabase
master).
This is a large and complex Java web application. The application is
connecting to approximately eight different databases. In the past that
hasn't been an issue.
The JDK/JRE version is jdk1.6.0_03
The web application is built using Maven, so we know exactly which
versions of the jars go into the application controlled by the pom:
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.0.5</version>
</dependency>
<dependency>
<groupId>hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.5</version>
</dependency>
<dependency>
<groupId>org.spring</groupId>
<artifactId>spring-core</artifactId>
<version>2.5.1</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
The application is doing its persistence to MySql using Spring and JDBC:
org.springframework.jdbc.datasource
org.springframework.jdbc.core.simple
Or with Spring Hibernate objects:
org.springframework.orm.hibernate3
A number of changes were made to our hibernate configuration attempting
to solve this issue:
<property name="hibernateProperties">
<props>
<prop
key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="current_session_context_class">thread</prop>
<prop
key="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</prop>
<prop key="hibernate.query.substitutions">true 1, false
0</prop>
<prop key="hibernate.connection.pool_size">40</prop>
<prop key="hibernate.dbcp.initialSize">40</prop>
<prop key="hibernate.dbcp.maxWait">6000</prop>
<prop key="hibernate.dbcp.validationQuery">SELECT 1 FROM
leads.adf_contact LIMIT 1</prop>
<prop key="hibernate.dbcp.testWhileIdle">true</prop>
<prop key="hibernate.dbcp.testOnReturn">true</prop>
<prop key="hibernate.dbcp.removeAbandoned">true</prop>
<prop key="hibernate.dbcp.minEvictableIdleTimeMillis">60000</prop>
<prop
key="hibernate.dbcp.numTestsPerEvictionRun">16</prop>
</props>
</property>
There are also some jdbc queries generated by the Quercus PHP compiler
when using their mysqli bridge object. (Quercus compiles PHP5 into
Java).
--
MySQL Java Mailing List
For list archives: http://lists.mysql.com/java
To unsubscribe: http://lists.mysql.com/[email protected]