• Connection problem 1 day after server start

  • Problems with installing OpenKM? No problemo, the solution is closer than you think.
Problems with installing OpenKM? No problemo, the solution is closer than you think.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #14216  by andrea.todeschini
 
Hi,
I have migrated from Openkm 5.0.4 to OpenKm 5.1.8. I use mysql as database. All features and the repository are ok and fully running, but about after 1 day that application is running, I obtain the follow error:
Code: Select all
2012-02-28 00:00:55,891 INFO  [org.apache.jackrabbit.core.persistence.bundle.util.LRUNodeIdCache] num=764/10240 hits=9578 miss=70422
2012-02-28 12:03:03,016 WARN  [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: 08S01
2012-02-28 12:03:03,016 ERROR [org.hibernate.util.JDBCExceptionReporter] The last packet successfully received from the server was 71.415.344 milliseconds ago.  The last packet sent successfully to the server was 71.415.344 milliseconds ago. 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. 


Consider that autoReconnect=true is setted in openkm-ds.xml as you can see:
Code: Select all
    <jndi-name>OpenKMDS</jndi-name>
    <connection-url>jdbc:mysql://localhost:3306/okm_app518?autoReconnect=true</connection-url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <user-name>openkm</user-name>
    <password>xxxxxx</password>
    <min-pool-size>5</min-pool-size>
    <max-pool-size>20</max-pool-size>
    <idle-timeout-minutes>28680</idle-timeout-minutes>
    <prepared-statement-cache-size>32</prepared-statement-cache-size>


and in repositoy.xml
Code: Select all
        <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager">
          <param name="driver" value="com.mysql.jdbc.Driver"/>
          <param name="url" value="jdbc:mysql://localhost:3306/okm_repo518?autoReconnect=true"/>
          <param name="schema" value="mysql"/>
          <param name="user" value="openkm"/>
          <param name="password" value="xxxxxxx"/>
          <param name="schemaObjectPrefix" value="version_"/>
          <param name="externalBLOBs" value="false"/>
        </PersistenceManager>


So each day I must restart the server to work. What can I do to solve this problem?

Thanks in advance.
Andrea
 #14245  by jllort
 
Your configuration seems right, but try with it

try adding
Code: Select all
<idle-timeout-minutes>28680</idle-timeout-minutes>
    <exception-sorter-class-name>com.mysql.jdbc.integration.jboss.ExtendedMysqlExceptionSorter</exception-sorter-class-name>
    <valid-connection-checker-class-name>com.mysql.jdbc.integration.jboss.MysqlValidConnectionChecker</valid-connection-checker-class-name>
    <metadata>
        <type-mapping>mySQL</type-mapping>
    </metadata>
 #14922  by jllort
 
you could take a look at repository/default and into some subfolder there is workspace.xml

really I don't know why you get this error. I should be done a revision in deep, try use same mysql driver that you used in 5.0.4 if it solves something, but as I said I think configuration is correctly.
 #15116  by vkasgpta
 
the default installation without any changes inside the files will be using HSQL db, i noticed your file showed mysql...? not sure if thats default setting or changed...
 #15214  by jllort
 
After OpenKM has started with some database only can be changed on migration procedure, not with yet started openkm repository.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.