periodically in the panel when entering this page (and some others): 9091/server-db.jsp i see:
com.mysql.cj.jdbc.exceptions.CommunicationsException: The last packet successfully received from the server was 97 916 milliseconds ago. The last packet sent successfully to the server was 97 916 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.
Adding a parameter did not help
jdbc:mysql://localhost:3306/openfire?rewriteBatchedStatements=true&serverTimezone=Europe/Moscow&autoReconnect=true
in the previous version there were no such problems
at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTask(OrderedThreadPoolExecutor.java:769) [mina-core-2.0.7.jar:?]
at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTasks(OrderedThreadPoolExecutor.java:761) [mina-core-2.0.7.jar:?]
at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.run(OrderedThreadPoolExecutor.java:703) [mina-core-2.0.7.jar:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_192]
2019.01.14 14:07:14 ERROR [TaskEngine-pool-55]: org.jivesoftware.openfire.pubsub.PubSubPersistenceManager - The last packet successfully received from the server was 171Â 245 milliseconds ago. The last packet sent successfully to the server was 171Â 246 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.
com.mysql.cj.jdbc.exceptions.CommunicationsException: The last packet successfully received from the server was 171Â 245 milliseconds ago. The last packet sent successfully to the server was 171Â 246 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.
at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:975) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1025) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:122) ~[commons-dbcp2-2.5.0.jar:2.5.0]
at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:122) ~[commons-dbcp2-2.5.0.jar:2.5.0]
at org.jivesoftware.openfire.pubsub.PubSubPersistenceManager.purgeItems(PubSubPersistenceManager.java:1877) [xmppserver-4.3.0.jar:4.3.0]
at org.jivesoftware.openfire.pubsub.PubSubPersistenceManager.access$000(PubSubPersistenceManager.java:57) [xmppserver-4.3.0.jar:4.3.0]
at org.jivesoftware.openfire.pubsub.PubSubPersistenceManager$2.run(PubSubPersistenceManager.java:283) [xmppserver-4.3.0.jar:4.3.0]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_192]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_192]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_192]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_192]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_192]
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: The last packet successfully received from the server was 171Â 245 milliseconds ago. The last packet sent successfully to the server was 171Â 246 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.
at sun.reflect.GeneratedConstructorAccessor44.newInstance(Unknown Source) ~[?:?]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_192]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_192]
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.protocol.a.NativeProtocol.readMessage(NativeProtocol.java:556) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:726) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.protocol.a.NativeProtocol.sendCommand(NativeProtocol.java:665) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.protocol.a.NativeProtocol.sendQueryPacket(NativeProtocol.java:980) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.NativeSession.execSQL(NativeSession.java:1185) ~[mysql-connector-java-8.0.12.jar:8.0.12]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:952) ~[mysql-connector-java-8.0.12.jar:8.0.12]
… 11 more
It looks to me like MySQL is configured to expire idle connections for some figure less than 97 seconds. The default idle time for Openfire is 15 minutes.
So there are probably two things to change;
a) Either increase the idle time in MySQL Server, or decrease the idle time in Openfire - <database><defaultProvider><minIdleTime> in openfire.xml
b) Enable the testBeforeUse - <database><defaultProvider><testBeforeUse>
Either way, it’s probably worth enabling “Test Connection Before Use” in light of the message “You should consider either expiring and/or testing connection validity before use in your application” - set the value of in openfire.xml