Seeing this http://bugs.caucho.com/view.php?id=1137
I'd guess your problem might be timeout as well. JackRabbit is using
long living connections and you are right that with Bundle PM it should
be also able to reconnect. Nevertheless I'd try to increase timeout on
MySQL and also check if you pool has some default timeout and is not
killing connections after while.

HTH,
Jan


On Thu, 2010-04-08 at 14:01 -0400, Miranda Jones wrote:
> Hello all,
> 
> We are running Magnolia 4.3.1 on Resin using MySQL for Jackrabbit.
> Our database configuration is in the Resin config set up as a JNDI
> DataSource.  Everything runs fine until the site has been idle for a
> while, and then we run into connection failures with the database.  It
> is my understanding that the bundle persistence manager is supposed to
> reconnect things, but it seems like that is not happening properly.
> We need to restart the site to get things to work again.
> 
> Does the error below look familiar to anyone or anyone have a
> suggestion how we might fix this?
> 
> Our database node in the Resin config is set up like this:
> 
> <database>
>   <jndi-name>java:comp/env/jdbc/foo</jndi-name>
>   <driver type="com.mysql.jdbc.Driver">
>     <url>jdbc:mysql://localhost/foo</url>
>     <user>foo</user>
>     <password>bar</password>
>   </driver>
>   <max-connections>100</max-connections>
>   <ping>true</ping>
>   <ping-table>CONFIG_BINVAL</ping-table>
> </database>
> 
> Normally, on all our other sites, we would set up the database driver
> with com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource, and
> in fact I did on this one, but then after reading the wiki
> documentation and noticing all the examples used
> com.mysql.jdbc.Driver, and seeing somewhere (I can't remember if it
> was on the Magnolia or Jackrabbit wiki) that connection pools
> shouldn't be used, I switched it, trying to fix the issue.  It is
> still happening, though.
> 
> After a while, we see the following stack trace (and similar ones)
> many many times:
> 
> ERROR  org.apache.jackrabbit.core.RepositoryImpl 06.04.2010 10:27:24
> -- error while closing persistence manager of workspace mgnlSystem
> java.lang.NullPointerException
>         at
> com.caucho.sql.UserConnection.getAutoCommit(UserConnection.java:616)
>         at
> org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager.close(ConnectionRecoveryManager.java:314)
>         at
> org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager.close(BundleDbPersistenceManager.java:1002)
>         at org.apache.jackrabbit.core.RepositoryImpl
> $WorkspaceInfo.doDispose(RepositoryImpl.java:2124)
>         at org.apache.jackrabbit.core.RepositoryImpl
> $WorkspaceInfo.dispose(RepositoryImpl.java:2069)
>         at
> org.apache.jackrabbit.core.RepositoryImpl.doShutdown(RepositoryImpl.java:1131)
>         at
> org.apache.jackrabbit.core.RepositoryImpl.shutdown(RepositoryImpl.java:1081)
>         at
> org.apache.jackrabbit.core.jndi.BindableRepository.shutdown(BindableRepository.java:242)
>         at
> org.apache.jackrabbit.core.jndi.RegistryHelper.unregisterRepository(RegistryHelper.java:94)
>         at
> info.magnolia.jackrabbit.ProviderImpl.shutdownRepository(ProviderImpl.java:238)
>         at
> info.magnolia.cms.beans.config.ContentRepository.shutdown(ContentRepository.java:205)
>         at
> info.magnolia.cms.beans.config.ConfigLoader.unload(ConfigLoader.java:86)
>         at info.magnolia.cms.servlets.MgnlServletContextListener
> $1.doExec(MgnlServletContextListener.java:165)
>         at info.magnolia.context.MgnlContext
> $VoidOp.exec(MgnlContext.java:433)
>         at info.magnolia.context.MgnlContext
> $VoidOp.exec(MgnlContext.java:431)
>         at
> info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:396)
>         at
> info.magnolia.cms.servlets.MgnlServletContextListener.contextDestroyed(MgnlServletContextListener.java:163)
>         at com.caucho.server.webapp.WebApp.stop(WebApp.java:2773)
>         at com.caucho.server.webapp.WebApp.destroy(WebApp.java:2797)
>         at
> com.caucho.server.deploy.DeployController.stopImpl(DeployController.java:750)
>         at
> com.caucho.server.deploy.AbstractDeployControllerStrategy.stop(AbstractDeployControllerStrategy.java:77)
>         at
> com.caucho.server.deploy.DeployController.stop(DeployController.java:571)
>         at
> com.caucho.server.deploy.DeployContainer.stop(DeployContainer.java:380)
>         at
> com.caucho.server.webapp.WebAppContainer.stop(WebAppContainer.java:1111)
>         at com.caucho.server.host.Host.stop(Host.java:559)
>         at com.caucho.server.host.Host.destroy(Host.java:576)
>         at
> com.caucho.server.deploy.DeployController.stopImpl(DeployController.java:750)
>         at
> com.caucho.server.deploy.AbstractDeployControllerStrategy.stop(AbstractDeployControllerStrategy.java:77)
>         at
> com.caucho.server.deploy.DeployController.stop(DeployController.java:571)
>         at
> com.caucho.server.deploy.DeployContainer.stop(DeployContainer.java:380)
>         at
> com.caucho.server.host.HostContainer.stop(HostContainer.java:495)
>         at com.caucho.server.cluster.Server.stop(Server.java:1649)
>         at com.caucho.server.cluster.Server.destroy(Server.java:1671)
>         at com.caucho.server.resin.Resin.destroy(Resin.java:817)
>         at com.caucho.server.resin.Resin
> $DestroyThread.run(Resin.java:1787)
> 
> 
> Thanks,
> Miranda
> 
> -- 
> Miranda Jones
> Objective Consulting, Inc.
> http://www.spiders.com 


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to