I posted the same question in stackoverflow.
http://stackoverflow.com/questions/7226775/database-error-connection-timed-out
Database error - Connection timed out
I'm using Play framework and phpmyadmin. When I run my application it
crashes with this error:
Database error
A database error occured : Cannot connect to the database, An attempt
by a client to checkout a Connection has timed out.
I cleared my browser Session and run the Play application again but it
shows the same message.
What's the source of the error?
The Error message is
09:45:40,832 INFO ~ Listening for HTTP on port 9000 (Waiting a first
request to start) ...
09:46:11,634 ERROR ~ Cannot connected to the database : An attempt by
a client to checkout a Connection has timed out.
java.sql.SQLException: An attempt by a client to checkout a Connection
has timed out.
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:
106)
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:
65)
at play.db.DBPlugin.onApplicationStart(DBPlugin.java:114)
at
play.plugins.PluginCollection.onApplicationStart(PluginCollection.java:
425)
at play.Play.start(Play.java:492)
at play.Play.detectChanges(Play.java:596)
at play.Invoker$Invocation.init(Invoker.java:186)
at Invocation.HTTP Request(Play!)
Caused by: com.mchange.v2.resourcepool.TimeoutException: A client
timed out while waiting to acquire a resource from
com.mchange.v2.resourcepool.BasicResourcePool@13c952f -- timeout at
awaitAvailable()
at
com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:
1317)
at
com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:
557)
at
com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:
477)
... 6 more
09:46:13,569 ERROR ~
@67k0c6c5i
Internal Server Error (500) for request GET /
Database error
A database error occured : Cannot connected to the database, An
attempt by a client to checkout a Connection has timed out.
play.exceptions.DatabaseException: Cannot connected to the database,
An attempt by a client to checkout a Connection has timed out.
at play.db.DBPlugin.onApplicationStart(DBPlugin.java:132)
at
play.plugins.PluginCollection.onApplicationStart(PluginCollection.java:
425)
at play.Play.start(Play.java:492)
at play.Play.detectChanges(Play.java:596)
at play.Invoker$Invocation.init(Invoker.java:186)
at Invocation.HTTP Request(Play!)
Caused by: java.sql.SQLException: An attempt by a client to checkout a
Connection has timed out.
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:
106)
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:
65)
at play.db.DBPlugin.onApplicationStart(DBPlugin.java:114)
... 5 more
Caused by: com.mchange.v2.resourcepool.TimeoutException: A client
timed out while waiting to acquire a resource from
com.mchange.v2.resourcepool.BasicResourcePool@13c952f -- timeout at
awaitAvailable()
at
com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:
1317)
at
com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:
557)
at
com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:
477)
... 6 more
I found when my internet connection is down then play ends with
connection timed out error.
What could be the source of the error.