Hi,

I increased wait_timeout in my.conf, and it worked. At least for listing 
widgets. Unfortunately, sometimes when my app queries widgets properties from 
Apache Wookie, it responds with 404. Sometimes it answers with 200 and the 
correct value for the requested property. I've double checked the url being 
used when calling the REST API and it is the same. Do you think this problem is 
related with the connector/J instability?

Regards,

David

-----Original Message-----
From: "Scott Wilson" <[email protected]>
Sent: Tuesday, 14 May, 2013 10:21
To: [email protected]
Subject: Re: ISSUE 404



On 14 May 2013, at 13:59, [email protected] wrote:

>
> Hello,
>
> I've just updated my Apache Wookie to the latest SVN version (05/13/2013) and 
> it crashes after a long idle period. I think it is the same problem described 
> in Issue 404. The exception that appears in the log is:

Yes, that does indeed look like the dreaded "MySQL Stale Connection" problem.

Starting with 0.14 we added a validation query ("SELECT 1") to the DBCP which 
usually fixes things. However, I did see this:

http://stackoverflow.com/questions/9069378/stale-connections-validationquery-does-not-fix

... which indicates that there may be a problem related to newer versions of 
Connector/J.. However the suggested fix there is to set wait_timeout in my.conf 
to a larger value.

>
>
>
> Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last 
> packet successfully received from the server was 54,330,467 milliseconds ago. 
>  The last packet sent successfully to the server was 54,330,469 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:57)
> at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
> at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
> at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
> at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3352)
> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1971)
> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151)
> at com..mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2625)
> at 
> com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119)
> at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2281)
> at 
> org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:280)
> at 
> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeQuery(LoggingConnectionDecorator.java:1061)
> at 
> org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement..executeQuery(DelegatingPreparedStatement.java:278)
> at 
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeQuery(JDBCStoreManager.java:1731)
> at 
> org.apache..openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:268)
> at org.apache..openjpa.jdbc.sql.SelectImpl.executeQuery(SelectImpl.java:471)
> at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:396)
> ... 40 more
> Caused by: java.net.SocketException: Broken pipe
> at java.net.SocketOutputStream.socketWrite0(Native Method)
> at java.net.SocketOutputStream.socketWrite(SocketOutputStream..java:109)
> at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
> at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
> at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
> at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3333)
> ... 52 more
>
> I've tried adding "autoReconnect=true" to the connection string but the 
> problem persists. Wookie is running on a Apache Tomcat 7 installed on a 
> Ubuntu Server 12.10. Java version is OpenJDK x64 "1.7.0_09" and the database 
> is a MySQL version "5.5.29-0ubuntu0.12.10.1".
>
> Any clues?
>
> Regards,
>
> David
>
>




Reply via email to