We recently switched over our Nuxeo test server to a MySQL 5.0.51b
back end (MySQL-AB JDBC Driver, version: mysql-connector-java-5.1.6).
Since then we've been experiencing problems with the Nuxeo EP web app
("document not available" errors) every 48 hours or so. Thanks in
advance for any input or pointers.

This MySQL documentation seems to address the issue, per some server
log review (below) and googling.

"26.4.5.3.4:  I have a servlet/application that works fine for a day,
and then stops working overnight

MySQL closes connections after 8 hours of inactivity. You either need
to use a connection pool that handles stale connections or use the
"autoReconnect" parameter (see Section 25.4.4.1, "Driver/Datasource
Class Names, URL Syntax and Configuration Properties for
Connector/J").

Also, you should be catching SQLExceptions in your application and
dealing with them, rather than propagating them all the way until your
application exits, this is just good programming practice. MySQL
Connector/J will set the SQLState (see
java.sql.SQLException.getSQLState() in your APIDOCS) to "08S01" when
it encounters network-connectivity issues during the processing of a
query. Your application code should then attempt to re-connect to
MySQL at this point."

Quoted from:

http://dev.mysql.com/doc/refman/5.0/en/connector-j-usagenotes-troubleshooting.html#qandaitem-26-4-5-3-4

Is their recommended solution consistent with Nuxeo 5.1's management
of JDBC connections? Are there default Nuxeo or Apache Jackrabbit
configuration options to consider modifying?

Possibly related discussion thread:

http://forums.mysql.com/read.php?39,55450,122573#msg-122573

Could this be related?

http://jira.nuxeo.org/browse/NXP-700

Our test Nuxeo server logs show a "java.net.SocketException:
Connection reset" error followed by a number of
"java.net.SocketException: Broken pipe" errors. These do not occur
until the server has been running for some time. A sample broken pipe
error log:

13:01:13,946 ERROR [BundleDbPersistenceManager]    State/Code: 08S01/0
13:01:13,947 ERROR [BundleDbPersistenceManager] Failed closing PreparedStatement
13:01:13,947 ERROR [BundleDbPersistenceManager]        Reason:
Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: Broken pipe

STACKTRACE:
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
        at 
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
        at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
        at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2739)
        at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2650)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1581)
        at 
com.mysql.jdbc.ServerPreparedStatement.realClose(ServerPreparedStatement.java:893)
        at 
com.mysql.jdbc.ServerPreparedStatement.close(ServerPreparedStatement.java:459)
        at 
org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager.closeStatement(BundleDbPersistenceManager.java:1161)
        at 
org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager.close(BundleDbPersistenceManager.java:823)
        at 
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.dispose(RepositoryImpl.java:1825)
        at 
org.apache.jackrabbit.core.RepositoryImpl.doShutdown(RepositoryImpl.java:946)
        at 
org.apache.jackrabbit.core.RepositoryImpl.shutdown(RepositoryImpl.java:900)
        at 
org.nuxeo.ecm.core.repository.jcr.JCRRepository.shutdown(JCRRepository.java:167)
        at 
org.nuxeo.ecm.core.repository.RepositoryManager$Ref.dispose(RepositoryManager.java:213)
        at 
org.nuxeo.ecm.core.repository.RepositoryManager.unregisterRepository(RepositoryManager.java:165)
        at 
org.nuxeo.ecm.core.repository.RepositoryService.unregisterExtension(RepositoryService.java:87)
        at 
org.nuxeo.runtime.model.impl.ComponentInstanceImpl.unregisterExtension(ComponentInstanceImpl.java:161)
        at 
org.nuxeo.runtime.model.impl.ComponentManagerImpl.unregisterExtension(ComponentManagerImpl.java:355)
        at 
org.nuxeo.runtime.model.impl.RegistrationInfoImpl.deactivate(RegistrationInfoImpl.java:269)
        at 
org.nuxeo.runtime.model.impl.RegistrationInfoImpl.unresolve(RegistrationInfoImpl.java:307)
        at 
org.nuxeo.runtime.model.impl.RegistrationInfoImpl.unregister(RegistrationInfoImpl.java:207)
        at 
org.nuxeo.runtime.model.impl.ComponentManagerImpl._unregister(ComponentManagerImpl.java:244)
        at 
org.nuxeo.runtime.model.impl.ComponentManagerImpl.unregister(ComponentManagerImpl.java:253)
        at 
org.nuxeo.runtime.model.impl.DefaultRuntimeContext.destroy(DefaultRuntimeContext.java:136)
        at 
org.nuxeo.runtime.jboss.adapter.deployment.XMLComponentDeployer.stop(XMLComponentDeployer.java:114)
        at org.jboss.deployment.MainDeployer.stop(MainDeployer.java:667)
        at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:638)
        at org.jboss.deployment.MainDeployer.shutdown(MainDeployer.java:516)
<snip>
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm

Reply via email to