Pentaho Server Fails Every Night… We have a solution
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.
on December 11th, 2007 at 1:54 pm
You must rename the downloaded file dbcpconnectionprovider.class to DBCPConnectionProvider.class for things work fine.
on December 18th, 2007 at 5:07 am
Awesome, thanks.
on January 3rd, 2008 at 10:54 am
Good work, much appreciated. Works a charm.
on January 8th, 2008 at 11:49 am
which hibernate.cfg.xml will I have to change? is located in jboss/server/default/deploy/pentaho.war/WEB-INF/classes/hibernate.cfg.xml ?
Thanks
on January 8th, 2008 at 2:10 pm
Sorry probably should have specified, yes that is the right hibernate.cfg.xml
on January 8th, 2008 at 3:53 pm
it still falls during the night? what else i can do?
Thanks
on January 11th, 2008 at 7:37 pm
You must take care with apostrophe. When you copy the code from this page, depending on the operating system, it may paste some other kind of apostrophe that your hibernate.cfg.xml could be able to recognize.