Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用clearDB在Heroku上播放2.2.3-已超过';最大用户连接数';资源_Heroku_Playframework_Playframework 2.2_Cleardb - Fatal编程技术网

使用clearDB在Heroku上播放2.2.3-已超过';最大用户连接数';资源

使用clearDB在Heroku上播放2.2.3-已超过';最大用户连接数';资源,heroku,playframework,playframework-2.2,cleardb,Heroku,Playframework,Playframework 2.2,Cleardb,我的Play应用程序在Heroku和clearDB上运行了一段时间。然后它因错误而崩溃 has exceeded the 'max_user_connections' resource 我遵循了这篇文章的指示 然而,问题没有得到解决。我甚至尝试将此配置添加到Procfile中 我能够通过MySQL workbench连接到我的数据库,所以当我的应用程序关闭时,这个问题似乎不会持续 尝试重新启动时的日志输出如下所示 State changed from crashed to starting

我的Play应用程序在Heroku和clearDB上运行了一段时间。然后它因错误而崩溃

has exceeded the 'max_user_connections' resource
我遵循了这篇文章的指示

然而,问题没有得到解决。我甚至尝试将此配置添加到Procfile中

我能够通过MySQL workbench连接到我的数据库,所以当我的应用程序关闭时,这个问题似乎不会持续

尝试重新启动时的日志输出如下所示

State changed from crashed to starting
Starting process with command `target/universal/stage/bin/listbucket -Dhttp.port=${PORT} -Ddb.default.driver=com.mysql.jdbc.Driver -Ddb.default.url=${CLEARDB_DATABASE_URL} -Ddb.default.partitionCount=1 -Ddb.default.maxConnectionsPerPartition=5 -Ddb.default.minConnectionsPerPartition=5`
Picked up JAVA_TOOL_OPTIONS:  -Djava.rmi.server.useCodebaseOnly=true
Play server process ID is 2
[error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection to jdbc:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true Sleeping for 1000ms and trying again. Attempts left: 10. Exception: null.Message:User 'b6cf16f10a7a77' has exceeded the 'max_user_connections' resource (current value: 10)
[error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection to jdbc:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true Sleeping for 1000ms and trying again. Attempts left: 9. Exception: null.Message:User 'b6cf16f10a7a77' has exceeded the 'max_user_connections' resource (current value: 10)
[error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection to jdbc:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true Sleeping for 1000ms and trying again. Attempts left: 8. Exception: null.Message:User 'b6cf16f10a7a77' has exceeded the 'max_user_connections' resource (current value: 10)
[error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection to jdbc:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true Sleeping for 1000ms and trying again. Attempts left: 7. Exception: null.Message:User 'b6cf16f10a7a77' has exceeded the 'max_user_connections' resource (current value: 10)
[error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection to jdbc:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true Sleeping for 1000ms and trying again. Attempts left: 6. Exception: null.Message:User 'b6cf16f10a7a77' has exceeded the 'max_user_connections' resource (current value: 10)
[error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection to jdbc:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true Sleeping for 1000ms and trying again. Attempts left: 5. Exception: null.Message:User 'b6cf16f10a7a77' has exceeded the 'max_user_connections' resource (current value: 10)
[error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection to jdbc:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true Sleeping for 1000ms and trying again. Attempts left: 4. Exception: null.Message:User 'b6cf16f10a7a77' has exceeded the 'max_user_connections' resource (current value: 10)
[error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection to jdbc:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true Sleeping for 1000ms and trying again. Attempts left: 3. Exception: null.Message:User 'b6cf16f10a7a77' has exceeded the 'max_user_connections' resource (current value: 10)
[error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection to jdbc:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true Sleeping for 1000ms and trying again. Attempts left: 2. Exception: null.Message:User 'b6cf16f10a7a77' has exceeded the 'max_user_connections' resource (current value: 10)
[error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection to jdbc:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true Sleeping for 1000ms and trying again. Attempts left: 1. Exception: null.Message:User 'b6cf16f10a7a77' has exceeded the 'max_user_connections' resource (current value: 10)
    at play.api.Configuration$.play$api$Configuration$$configError(Configuration.scala:92)
    at play.api.Configuration.reportError(Configuration.scala:570)
Configuration error: Configuration error[Cannot connect to database [default]]
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    at scala.collection.immutable.List.foreach(List.scala:318)
Oops, cannot start the server.
    at scala.collection.immutable.List.foreach(List.scala:318)
    at play.api.Play$$anonfun$start$1.apply(Play.scala:88)
    at play.utils.Threads$.withContextClassLoader(Threads.scala:18)
    at play.core.StaticApplication.<init>(ApplicationProvider.scala:52)
    at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:88)
    at play.api.db.BoneCPPlugin$$anonfun$onStart$1.apply(DB.scala:243)
    at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:88)
    at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:274)
    at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:279)
    at play.core.server.NettyServer$.main(NettyServer.scala:274)
    at play.core.server.NettyServer$.createServer(NettyServer.scala:243)
    at play.core.server.NettyServer.main(NettyServer.scala)
    at play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:88)
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
    at scala.Option.map(Option.scala:145)
    at play.api.Play$$anonfun$start$1.apply(Play.scala:88)
    at play.api.db.BoneCPPlugin$$anonfun$onStart$1.apply(DB.scala:252)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    at scala.collection.AbstractTraversable.map(Traversable.scala:105)
    at play.api.db.BoneCPPlugin.onStart(DB.scala:243)
    at play.api.Play$.start(Play.scala:87)
State changed from starting to crashed
Process exited with status 255
State changed from crashed to starting
Starting process with command `target/universal/stage/bin/listbucket -Dhttp.port=${PORT} -Ddb.default.driver=com.mysql.jdbc.Driver -Ddb.default.url=${CLEARDB_DATABASE_URL} -Ddb.default.partitionCount=1 -Ddb.default.maxConnectionsPerPartition=5 -Ddb.default.minConnectionsPerPartition=5`
Picked up JAVA_TOOL_OPTIONS:  -Djava.rmi.server.useCodebaseOnly=true
Play server process ID is 2
[error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection to jdbc:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true Sleeping for 1000ms and t
rying again. Attempts left: 10. Exception: null.Message:User 'b6cf16f10a7a77' has exceeded the 'max_user_connections' resource (current value: 10)
[error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection to jdbc:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true Sleeping for 1000ms and trying again. Attempts left: 9. Exception: null.Message:User 'b6cf16f10a7a77' has exceeded the 'max_user_connections' resource (current value: 10)
[error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection to jdbc:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true Sleeping for 1000ms and trying again. Attempts left: 8. Exception: null.Message:User 'b6cf16f10a7a77' has exceeded the 'max_user_connections' resource (current value: 10)
[error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection to jdbc:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true Sleeping for 1000ms and trying again. Attempts left: 7. Exception: null.Message:User 'b6cf16f10a7a77' has exceeded the 'max_user_connections' resource (current value: 10)
[error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection to jdbc:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true Sleeping for 1000ms and trying again. Attempts left: 6. Exception: null.Message:User 'b6cf16f10a7a77' has exceeded the 'max_user_connections' resource (current value: 10)
[error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection to jdbc:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true Sleeping for 1000ms and trying again. Attempts left: 5. Exception: null.Message:User 'b6cf16f10a7a77' has exceeded the 'max_user_connections' resource (current value: 10)
[error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection to jdbc:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true Sleeping for 1000ms and trying again. Attempts left: 4. Exception: null.Message:User 'b6cf16f10a7a77' has exceeded the 'max_user_connections' resource (current value: 10)
[error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection to jdbc:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true Sleeping for 1000ms and trying again. Attempts left: 3. Exception: null.Message:User 'b6cf16f10a7a77' has exceeded the 'max_user_connections' resource (current value: 10)
[error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection to jdbc:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true Sleeping for 1000ms and trying again. Attempts left: 2. Exception: null.Message:User 'b6cf16f10a7a77' has exceeded the 'max_user_connections' resource (current value: 10)
[error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection to jdbc:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true Sleeping for 1000ms and trying again. Attempts left: 1. Exception: null.Message:User 'b6cf16f10a7a77' has exceeded the 'max_user_connections' resource (current value: 10)
状态从崩溃更改为启动
使用命令`target/universal/stage/bin/listbucket-Dhttp.port=${port}-Ddb.default.driver=com.mysql.jdbc.driver-Ddb.default.url=${CLEARDB\u DATABASE\u url}-Ddb.default.partitionCount=1-Ddb.default.maxConnectionsPerPartition=5-Ddb.default.minConnectionsPerPartition=5启动进程`
选择JAVA工具选项:-Djava.rmi.server.useCodebaseOnly=true
播放服务器进程ID为2
[错误]c.j.b.h.AbstractConnectionHook-无法获取到jdbc的连接:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true 睡1000毫秒,然后再试一次。还剩10次。异常:null。消息:用户“b6cf16f10a7a77”已超过“最大用户连接数”资源(当前值:10)
[错误]c.j.b.h.AbstractConnectionHook-无法获取到jdbc的连接:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true 睡1000毫秒,然后再试一次。左:9。异常:null。消息:用户“b6cf16f10a7a77”已超过“最大用户连接数”资源(当前值:10)
[错误]c.j.b.h.AbstractConnectionHook-无法获取到jdbc的连接:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true 睡1000毫秒,然后再试一次。左:8。异常:null。消息:用户“b6cf16f10a7a77”已超过“最大用户连接数”资源(当前值:10)
[错误]c.j.b.h.AbstractConnectionHook-无法获取到jdbc的连接:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true 睡1000毫秒,然后再试一次。左:7。异常:null。消息:用户“b6cf16f10a7a77”已超过“最大用户连接数”资源(当前值:10)
[错误]c.j.b.h.AbstractConnectionHook-无法获取到jdbc的连接:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true 睡1000毫秒,然后再试一次。左:6。异常:null。消息:用户“b6cf16f10a7a77”已超过“最大用户连接数”资源(当前值:10)
[错误]c.j.b.h.AbstractConnectionHook-无法获取到jdbc的连接:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true 睡1000毫秒,然后再试一次。剩余尝试次数:5次。异常:null。消息:用户“b6cf16f10a7a77”已超过“最大用户连接数”资源(当前值:10)
[错误]c.j.b.h.AbstractConnectionHook-无法获取到jdbc的连接:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true 睡1000毫秒,然后再试一次。左:4。异常:null。消息:用户“b6cf16f10a7a77”已超过“最大用户连接数”资源(当前值:10)
[错误]c.j.b.h.AbstractConnectionHook-无法获取到jdbc的连接:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true 睡1000毫秒,然后再试一次。左:3。异常:null。消息:用户“b6cf16f10a7a77”已超过“最大用户连接数”资源(当前值:10)
[错误]c.j.b.h.AbstractConnectionHook-无法获取到jdbc的连接:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true 睡1000毫秒,然后再试一次。左:2。异常:null。消息:用户“b6cf16f10a7a77”已超过“最大用户连接数”资源(当前值:10)
[错误]c.j.b.h.AbstractConnectionHook-无法获取到jdbc的连接:mysql://us-cdbr-iron-east-01.cleardb.net/heroku_f176dd782ce596b?reconnect=true 睡1000毫秒,然后再试一次。左:1。异常:null。消息:用户“b6cf16f10a7a77”已超过“最大用户连接数”资源(当前值:10)
在play.api.Configuration$.play$api$Configuration$$configError(Configuration.scala:92)
at play.api.Configuration.reportError(Configuration.scala:570)
配置错误:配置错误[无法连接到数据库[默认]]
位于scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
位于scala.collection.immutable.List.foreach(List.scala:318)
哦,无法启动服务器。
位于scala.collection.immutable.List.foreach(List.scala:318)
在play.api.play$$anonfun$start$1.apply(play.scala:88)
在播放时.utils.Threads$.withContextClassLoader(Threads.scala:18)
正在运行.core.StaticApplication。(ApplicationProvider.scala:52)
在play.api.play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(play.scala:88)
at play.api.db.BoneCPPlugin$$anonfun$onStart$1.apply(db.scala:243)
在play.api.play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(play.scala:88)
at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:274)
at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:279)
at play.core.server.NettyServer$.main(NettyServer.scala:274)
播放时.core.server.NettyServer$.createServer(NettyServer.scala:243)
正在运行的.core.server.NettyServer.main(NettyServer.scala)
在play.api.play$$anonfun$start$1.apply$mcV$sp(play.scala:88)
位于scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
位于scala.Option.map(Option.scala:145)
在play.api.play$$anonfun$start$1.apply(play.scala:88)
at play.api.db.BoneCPPlugin$$anonfun$onStart$1.apply(db.scala:252)
位于scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
位于scala.collection.AbstractTraversable.map(Traversable.s
# In order to reduce lock contention and thus improve performance, 
# each incoming connection request picks off a connection from a 
# pool that has thread-affinity. 
# The higher this number, the better your performance will be for the 
# case when you have plenty of short-lived threads. 
# Beyond a certain threshold, maintenance of these pools will start 
# to have a negative effect on performance (and only for the case 
# when connections on a partition start running out).
db.default.partitionCount=2

# The number of connections to create per partition. Setting this to 
# 5 with 3 partitions means you will have 15 unique connections to the 
# database. Note that BoneCP will not create all these connections in 
# one go but rather start off with minConnectionsPerPartition and 
# gradually increase connections as required.
db.default.maxConnectionsPerPartition=5

# The number of initial connections, per partition.
db.default.minConnectionsPerPartition=5