New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation about mysql configuration #141

Closed
ypujante opened this Issue May 1, 2012 · 1 comment

Comments

Projects
None yet
1 participant
@ypujante
Member

ypujante commented May 1, 2012

From a conversation with Zoran @ LinkedIn:


Hi Yan,

It can be done via the config like so for example (same settings as what was suggested in that blog post):

dataSource.properties.validationQuery = "SELECT 1"
dataSource.properties.testWhileIdle = false
dataSource.properties.timeBetweenEvictionRunsMillis = 1800000
dataSource.properties.minEvictableIdleTimeMillis = 1800000
dataSource.properties.numTestsPerEvictionRun = 3
dataSource.properties.testOnBorrow = true
dataSource.properties.testOnReturn = false

or:

environments {
development {
dataSource {
...
url = "jdbc:mysql://localhost/glu"
properties {
validationQuery="SELECT 1"
testWhileIdle=false
timeBetweenEvictionRunsMillis=1800000
minEvictableIdleTimeMillis=1800000
numTestsPerEvictionRun=3
testOnBorrow=true
testOnReturn=false
}
}
}
}


to fix the exception:

2012/04/25 10:08:30.344 ERROR [JDBCExceptionReporter] The last packet successfully received from the server was 73,329,213 milliseconds ago. The last packet sent successfully to the server was 73,329,214 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.

@ghost ghost assigned ypujante May 1, 2012

ypujante added a commit that referenced this issue Jul 26, 2012

@ypujante

This comment has been minimized.

Member

ypujante commented Jul 26, 2012

Added documentation in 4.4.2

@ypujante ypujante closed this Jul 26, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment