Setup:
I got 4 identical .jar files that run a select query on a MySQL server (on Debian 8.08) every 5 seconds.
After approx 7 hours, all 4 jars crash at the same time with an error (catched in the Application_Error event).
my Initialization:
I got 4 identical .jar files that run a select query on a MySQL server (on Debian 8.08) every 5 seconds.
After approx 7 hours, all 4 jars crash at the same time with an error (catched in the Application_Error event).
my Initialization:
B4X:
SQL.Initialize2("com.mysql.jdbc.Driver", "jdbc:mysql://192.xxx.xxx.xxx:3306/c25database?characterEncoding=utf8", login, password)
B4X:
(RuntimeException) java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet successfully received from the server was 23.918 milliseconds ago. The last packet sent successfully to the server was 18.916 milliseconds ago.
main._appstart (java line: 626)
java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet successfully received from the server was 23.918 milliseconds ago. The last packet sent successfully to the server was 18.916 milliseconds ago.
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:119)
at anywheresoftware.b4a.objects.Timer$TickTack$1.run(Timer.java:118)
at anywheresoftware.b4a.keywords.SimpleMessageLoop.runMessageLoop(SimpleMessageLoop.java:30)
at anywheresoftware.b4a.StandardBA.startMessageLoop(StandardBA.java:26)
at anywheresoftware.b4a.keywords.Common.StartMessageLoop(Common.java:148)
at b4j.example.main._appstart(main.java:626)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:77)
at b4j.example.main.main(main.java:29)
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet successfully received from the server was 23.918 milliseconds ago. The last packet sent successfully to the server was 18.916 milliseconds ago.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:983)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3457)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3357)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3797)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2470)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2617)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2550)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1962)
at anywheresoftware.b4j.objects.SQL.ExecQuery2(SQL.java:342)
at anywheresoftware.b4j.objects.SQL.ExecQuerySingleResult2(SQL.java:390)
at b4j.example.dbmclass._sqlselectforupdatewithpre(dbmclass.java:246)
at b4j.example.main._runtimer_tick(main.java:775)
at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90)
... 12 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:100)
at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:143)
at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:173)
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2946)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3367)
... 27 more