Thanks for your answer, Florent.

I also tried with the configuration you say. I configure it with the following line:

<param name="url" value="jdbc:mysql://localhost/mydatabase?autoReconnect=true"/>

But it still fails. Is the previous line correct or I have to add something like the following one?:

<param name="autoReconnect" value="true"/>

Thanks in advance.

Florent Guillaume wrote:
Hi,

The error (simplified below) is a Jackrabbit error. So the connection parameters to modify are those of the Jackrabbit configuration file.

For a blank server the file is in config/repository-config.xml (or config/default-repository-config.xml depending on how you named it). Once the database is created it lives in server/default/data/NXRuntime/repos/default/default.xml. It's the <PersistenceManager> section.

The <connection-url> you mention is for a JDBC datasource, but that's not what Jackrabbit uses for configuration.

See http://www.google.com/search?q=jackrabbit+mysql+autoReconnect for more.

Florent

On 22 Apr 2009, at 09:18, Enrique Perez wrote:

Hi all,

I have a Nuxeo instance (5.1.6-2) using a MySql database. When I start the server it works fine, but if I try to upload a file after a couple of days it crashes. It seems like if the connection with the database is closed.

I try with the autoReconnect property:

<connection-url>jdbc:mysql://localhost/mydatabase?relaxAutoCommit=true&amp;emulateLocators=true&amp;autoReconnect=true</connection-url>

But the platform still crashes.

The exception I get when I upload a file is:


org.nuxeo.ecm.core.api.ClientException

org.nuxeo.ecm.core.api.WrappedException: Exception: org.nuxeo.ecm.core.api.ClientException. message: org.nuxeo.ecm.core.api.WrappedException: Exception: org.nuxeo.ecm.core.api.ClientException. message: Failed to save session

org.nuxeo.ecm.core.api.WrappedException

Exception: com.mysql.jdbc.CommunicationsException. message: The last packet successfully received from the server was88772 milliseconds ago.The last packet sent successfully to the server was 88772 milliseconds ago, which is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.

com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1070)
com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3270)
com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1932)
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)
com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2548)
com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:4916)
org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager.store(BundleDbPersistenceManager.java:484) org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(SharedItemStateManager.java:688) org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:855) org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:326) org.apache.jackrabbit.core.state.XAItemStateManager.update(XAItemStateManager.java:313) org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:302) org.apache.jackrabbit.core.state.SessionItemStateManager.update(SessionItemStateManager.java:306)
org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1240)
org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:849)
org.nuxeo.ecm.core.repository.jcr.JCRSession.save(JCRSession.java:146)
org.nuxeo.ecm.core.api.AbstractSession.save(AbstractSession.java:1457)




--
Enrique Pérez Olivares.
Dpto I+D.
Yerbabuena Software.
[email protected]
http://www.yerbabuena.es
Tlf/Fax: 902 995 246
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm

Reply via email to