Problem with MySQL (MariaDB): timeout

315 views
Skip to first unread message

Alessio

unread,
Sep 5, 2018, 3:42:49 AM9/5/18
to dcm...@googlegroups.com
I'm using dcm4chee-arc-5.14.0-mysql-secure-ui, and it seems to work.

But sometimes, in the logs I spotted these warnings/errors, and as far as I can see, they appears after a period of inactivity, but I'm not sure. This lead to some unexpected behavior (unexpected logout, failure to send studies to the dicom server, etc.).

07:23:43,310 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (EE-ManagedScheduledExecutorService-default-Thread-2) SQL Error: 0, SQLState: 08S01
07:23:43,320 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (EE-ManagedScheduledExecutorService-default-Thread-2) The last packet successfully received from the server was 2,402,249 milliseconds ago.  The last packet sent successfully to the server was 2,402,249 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.
07:23:44,244 ERROR [org.jboss.as.ejb3.invocation] (EE-ManagedScheduledExecutorService-default-Thread-2) WFLYEJB0034: EJB Invocation failed on component IANEJB for method public java.util.List org.dcm4chee.arc.ian.scu.impl.IANEJB.fetchIANTasksForMPPS(java.lang.String,long,int): javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: could not extract ResultSet

It is stated to add "autoReconnect=true" to the connector, and in fact this is in my pacsds data-source: 
connection-url=jdbc:mysql://dbserver:3306/pacsdb?autoReconnect=true
But the problem remains.

Do you have any experience and some advice?

Thanks
A.


Alessio

unread,
Sep 18, 2018, 10:59:09 AM9/18/18
to dcm...@googlegroups.com
Hello.
I continue to experience issues with MariaDB.
I also installed the MariaDB connector, but without any improvement.

I continue to get messages in the logs like this:
16:50:03,817 ERROR [org.dcm4chee.arc.qmgt.impl.QueueManagerEJB] (Thread-23 (ActiveMQ-client-global-threads)) Failed to update status of Task[id=ID:203337f2-bb52-11e8-ac1b-b2ace980ee1a] in DB onProcessingStart:
...
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not extract ResultSet
....
Caused by: org.hibernate.exception.GenericJDBCException: could not extract ResultSet
...
Caused by: java.sql.SQLException: execute() is called on closed statement

Or also:
16:50:03,816 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (Thread-23 (ActiveMQ-client-global-threads)) SQL Error: 0, SQLState: null
16:50:03,816 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (Thread-23 (ActiveMQ-client-global-threads)) execute() is called on closed statement
16:50:03,816 ERROR [org.jboss.as.ejb3.invocation] (Thread-23 (ActiveMQ-client-global-threads)) WFLYEJB0034: EJB Invocation failed on component QueueManagerEJB for method public org.dcm4chee.arc.entity.QueueMessage org.dcm4chee.arc.qmgt.impl.QueueManagerEJB.onProcessingStart(java.lang.String): javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not extract ResultSet

I've tinkered with the datasource configuration, but also without any success:

<datasource jndi-name="java:/PacsDS" pool-name="pacsds">
  <connection-url>jdbc:mysql://mariadb:3306/pacsdb?autoReconnect=true</connection-url>
    <driver>mysql</driver>
    <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
    <pool>
      <min-pool-size>10</min-pool-size>
      <max-pool-size>100</max-pool-size>
      <prefill>true</prefill>
    </pool>
    <statement>
      <prepared-statement-cache-size>32</prepared-statement-cache-size>
      <share-prepared-statements/>
    </statement>
    <security>
      <user-name>pacs</user-name>
      <password>pass</password>
    </security>
</datasource>

What do you think?

Thanks,
A.



Reply all
Reply to author
Forward
0 new messages