db connection error

24 views
Skip to first unread message

stark

unread,
Sep 7, 2012, 4:00:13 AM9/7/12
to scooter-...@googlegroups.com
Yo John,

I encountered this problem when i deployed yesterday, i am using the recent version of scooter.

Encountered this exception, somehow it reconnected after a few seconds (40sec - 1 minute)  after this exception.

Please advise on how to resolve this and would the 'autoReconnect=true' will help? also would this setting apply for connection pooling?

Also why do you think this is happening?


Many Thanks.




-- start snip -- 


12/09/07 15:18:45,165 ERROR SqlExpressUtil - Exception in lookupTableInfo(): Failed to get meta data info of 'employee' with database connection 'prj_development' catalog 'hrportal', schema 'null'. Reason: Faied to set readonly property for connection "prj_development" because The last packet successfully received from the server was 50,592,728 milliseconds ago.  The last packet sent successfully to the server was 50,592,728 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..

12/09/07 15:18:45,165 ERROR EmployeeController - Failed to instantiate class "hr.models.Employee". Details: com.scooterframework.orm.sqldataexpress.exception.CreateConnectionFailureException: Faied to set readonly property for connection "prj_development" because The last packet successfully received from the server was 67,409,709 milliseconds ago.  The last packet sent successfully to the server was 67,409,709 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.connName = null


-- end snip --

John Chen

unread,
Sep 7, 2012, 11:15:54 PM9/7/12
to scooter-...@googlegroups.com
Hi Stark,
 
Did you just create a connection and then go to sleep and forget about it? :)
 
When you came back, your database might have timed out the connection. Thus you got the exception in your first request attempt. Then Scooter restabilished the connection and you were fine after that.
 
I think someone had mentioned a fix for this months ago in this mailing group. I will search for it.
 
Ok, found it. See the email thread titled "looking for the best solution for mysql connection timeout" on Mar 7, 2011.
 
John

stark

unread,
Sep 8, 2012, 1:06:37 PM9/8/12
to scooter-...@googlegroups.com


Hello John,


Sweet...... hope it works so i can continue sleeping... ;)


Thanks!

Reply all
Reply to author
Forward
0 new messages