If the DB goes down at on point, even after the DB is up again all following request will fail
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
play framework | Status tracked in 1.0 | |||||
1.0 |
Fix Committed
|
High
|
Unassigned | |||
1.1 |
Fix Committed
|
High
|
Unassigned |
Bug Description
If the DB connection fail for one moment (Cannot open connection), even after the DB in up againt all following request will fail too.
For now I have to restart the play application (1.0.1) to make it work again.
I guess something is not rebuild or checked.
Maybe in play.db.
Regards,
Here is the Exception I got after restarting the DB (oracle 10G) :
@61p8f726i
Internal Server Error (500) for request GET /interfaces
Oops: PersistenceExce
An unexpected error occured caused by exception PersistenceExce
org.hibernate.
play.exceptions
at play.Invoker$
at play.Invoker$
at Invocation.HTTP Request(Play!)
Caused by: javax.persisten
org.hibernate.
at
org.hibernate.
614)
at org.hibernate.
at play.db.
at play.db.
at play.Invoker$
at play.Invoker$
... 1 more
Caused by: org.hibernate.
connection
at
org.hibernate.
126)
at
org.hibernate.
114)
at
org.hibernate.
66)
at
org.hibernate.
52)
at
org.hibernate.
449)
at
org.hibernate.
167)
at org.hibernate.
at
org.hibernate.
85)
at org.hibernate.
1354)
at org.hibernate.
... 5 more
Caused by: java.sql.
following failure: com.mchange.
Attempted to use a closed or broken resource pool
at com.mchange.
at com.mchange.
at com.mchange.
at
com.mchange.
531)
at
com.mchange.
128)
at
org.hibernate.
46)
at
org.hibernate.
446)
... 10 more
Caused by: com.mchange.
Attempted to use a closed or broken resource pool
at
com.mchange.
1632)
at
com.mchange.
524)
at
com.mchange.
477)
at
com.mchange.
525)
... 13 more
Changed in play: | |
importance: | Undecided → High |
Changed in play: | |
status: | New → Won't Fix |
Just to add some information about this issue, you can configure C3P0 pool to check connections periodically:
http:// www.mchange. com/projects/ c3p0/index. html#configurin g_connection_ testing
Not sure about that, but maybe you just need to add the following property in you application.conf:
hibernate. c3p0.idleConnec tionTestPeriod= 5 #or any other number of seconds