有时我的play2应用程序正在运行但有时却没有。我怀疑它没有在开发模式下释放连接。这是错误:
[error] c.j.b.h.AbstractConnectionHook - Failed to obtain initial connection Sle
eping for 0ms and trying again. Attempts left: 0. Exception: null
[error] application -
! @6c1j5m094 - Internal server error, for request [GET /] ->
play.api.Configuration$$anon$1: Configuration error [Cannot connect to database
[default]]
at play.api.Configuration$.play$api$Configuration$$configError(Configura
tion.scala:71) ~[play_2.9.1.jar:2.0.4]
at play.api.Configuration.reportError(Configuration.scala:258) ~[play_2.
9.1.jar:2.0.4]
at play.api.db.BoneCPPlugin$$anonfun$onStart$1.apply(DB.scala:249) ~[pla
y_2.9.1.jar:2.0.4]
at play.api.db.BoneCPPlugin$$anonfun$onStart$1.apply(DB.scala:240) ~[pla
y_2.9.1.jar:2.0.4]
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike
.scala:194) ~[scala-library.jar:0.11.3]
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike
.scala:194) ~[scala-library.jar:0.11.3]
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: User bestt
v already has more than 'max_user_connections' active connections
这是我的配置(我只添加了我为解决此问题而添加的条目,但似乎没有帮助):
db.default.partitionCount=1
db.default.maxConnectionsPerPartition=5
db.default.minConnectionsPerPartition=1
db.default.acquireIncrement=1
db.default.acquireRetryAttempts=1
db.default.acquireRetryDelay=5 seconds
我不明白它是否与cloudbees或play有关。类似玩家的人说它在游戏2(1月份)中得到了解决,但似乎没有......