WAMOnline Blog


Pentaho Server Fails Every Night… We have a solution

Posted in Pentaho Business Intelligence Suite, Pentaho Hints and Tips by admin on the November 12th, 2007

Have you been having issues when you pentaho server is no longer chatting to MySQL when you arrive at work the following morning. I had an annoying issue where my server no longer sent attachments after it had been up for 8 hours because MySQL was closing the idle connections and hibernate wasn’t reopening them when it ran the scheduled task. After days of debugging the solution is thus….

Get a copy of dbcpconnectionprovider.class and copy it into WEB-INF/classes/org/hibernate/connection/ (create the directories if they don’t exist)

Then add the following to hibernate.cfg.xml….

<property name=”hibernate.connection.provider_class”>

org.hibernate.connection.DBCPConnectionProvider

</property>
<property name=”hibernate.dbcp.initialSize”>8</property>
<property name=”hibernate.dbcp.validationQuery”>SELECT 1</property>
<property name=”hibernate.dbcp.testOnBorrow”>true</property>
<property name=”hibernate.dbcp.testOnReturn”>false</property>
<property name=”hibernate.dbcp.testWhileIdle”>true</property>
<property name=”hibernate.dbcp.minIdle”>4</property>
<property name=”hibernate.dbcp.timeBetweenEvictionRunsMillis”>120000</property>
<property name=”hibernate.dbcp.numTestsPerEvictionRun”>3</property>
<property name=”hibernate.dbcp.minEvictableIdleTimeMillis”>120000</property>

And it should keep your connections pooled so you no longer suffer from this issue.