[Mondrian] connection issues with mondrianOlap4j

Paul Stoellberger p.stoellberger at gmail.com
Wed Jun 8 13:11:43 EDT 2011


since quite a while we are experiencing very strange behaviour on our demo.
At some point olap4j / mondrian cant execute any queries anymore.
We were initially using normal jdbc based connections for mondrian / olap4j. Which resulted in "freeze" behaviour without any info in any log file what went wrong whenever mondrian tried to execute something on the database

Now with JNDI i get the following exception:
        at mondrian.rolap.RolapConnection.execute(RolapConnection.java:582)
        ... 79 more
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object
        at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:104)
        at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
        at mondrian.rolap.SqlStatement.execute(SqlStatement.java:123)
        ... 90 more
Caused by: java.util.NoSuchElementException: Timeout waiting for idle object
        at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:958)
        at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
        ... 92 more

In our workflow we create one olap4j connection on server startup and use that to create new Query objects.
We never close any connections, nor remove query objects that are abandoned by users, we keep them indefinitely at the moment.
I was looking at the log files and saw that the error occurred suddenly, not after a timeout or something. There was something successfully executed 5 mins before on the database.
Mysql doesn't report anything on "SHOW PROCESSLIST", so i'm assuming the connection pool is not exhausted from the DB point of view, but rather because of mondrian.

Is there anything in our workflow that could  cause mondrian to behave like that?
Does it not close its jdbc connections?

This error occurs with both, mysql and hsqldb.

I'm running out of ideas what i could do to fix or even debug this issues.

If anyone has any idea on what I could try, please step forward ;-)


More information about the Mondrian mailing list