Repository Server connection lost

Hello,

We upgraded from Servoy 5.1.4 to 5.2.6. Our configuration is installed on Linux 64bit JVM 1.6.20, Mysql database.

We have 6 database connections defined in the server, 5 connect to MYSQL. The repository is the only mysql database connection to drop. The other 4 stay online.

The repository data server connection is going offline every other day or so? We did not see this behaviour with 5.1.4. Our solution was hosted in 5.1.4 for about 6 months before moving to 5.2.6

Thx
Lach

com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.Connection was implicitly closed due to underlying exception/error: ** BEGIN NESTED EXCEPTION ** com.mysql.jdbc.exceptions.jdbc4.CommunicationsException MESSAGE: The last packet successfully received from the server was 194,597,538 milliseconds ago. The last packet sent successfully to the server was 194,597,538 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. STACKTRACE: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 194,597,538 milliseconds ago. The last packet sent successfully to the server was 194,597,538 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.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074) at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3291) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1938) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2107) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2642) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2571) at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1451) at com.mysql.jdbc.DatabaseMetaData$9.forEach(DatabaseMetaData.java:4846) at com.mysql.jdbc.IterateBlock.doForAll(IterateBlock.java:50) at com.mysql.jdbc.DatabaseMetaData.getTables(DatabaseMetaData.java:4824) at com.mysql.jdbc.DatabaseMetaData$2.forEach(DatabaseMetaData.java:2380) at com.mysql.jdbc.IterateBlock.doForAll(IterateBlock.java:50) at com.mysql.jdbc.DatabaseMetaData.getColumns(DatabaseMetaData.java:2346) at org.apache.commons.dbcp.DelegatingDatabaseMetaData.getColumns(DelegatingDatabaseMetaData.java:218) at org.apache.commons.dbcp.DelegatingDatabaseMetaData.getColumns(DelegatingDatabaseMetaData.java:218) at org.apache.commons.dbcp.DelegatingDatabaseMetaData.getColumns(DelegatingDatabaseMetaData.java:218) at com.servoy.j2db.server.Zc.Zo.Zk(Zo.java:464) at com.servoy.j2db.server.Zc.Zo.Zh(Zo.java:560) at com.servoy.j2db.server.Zc.Zo.Zg(Zo.java:1472) at com.servoy.j2db.server.Zc.Zo.Zc(Zo.java:790) at com.servoy.j2db.server.Zc.Zo.Zb(Zo.java:573) at com.servoy.j2db.server.Zc.Zo.Zd(Zo.java:1074) at com.servoy.j2db.server.Zc.Zo.getRepositoryTable(Zo.java:1400) at com.servoy.j2db.dataprocessing.Zi.Za(Zi.java:57) at com.servoy.j2db.dataprocessing.Zi.Za(Zi.java:50) at com.servoy.j2db.dataprocessing.Zb.Za(Zb.java:188) at com.servoy.j2db.dataprocessing.Zg.run(Zg.java:3) at com.servoy.j2db.util.TaskExecuter.run(TaskExecuter.java:82) at java.lang.Thread.run(Thread.java:619) Caused by: java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123) at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3272) ... 27 more ** END NESTED EXCEPTION **

I think this has nothing todo with the Servoy version.

use with mySQL always SELECT 1 as a query validation (you can set this in the servoy-admin-page or the servoy.properties file!

Hi Harjo,

You are correct!

The other Mysql connections had the validation query set to ‘Select 1’. I have made the change for the repository server. I will restart the server tonight.

thx
Lach

Great tip! I was experiencing exactly this issue after upgrading to Servoy 5 on our mySQL server. It is not enough just to set the validation to “Select 1”, however. You must also set validation type to Query Validation. After that, no problems!

amisle:
You must also set validation type to Query Validation. After that, no problems!

indeed!