LoginSignup
1
1

More than 5 years have passed since last update.

Heroku上のPlayから外のMysqlに接続すると、1度目は必ず失敗してしまう問題の解決方法

Last updated at Posted at 2012-06-20

ありません。

先日scalaの勉強会で見てもらった限りでは、現状(2012/06/19現在)、根本的な解決策は「ない」とのことでした。
2回目はうまくいくので、リトライするようにしましょう。

heroku上の該当のエラーログの抜粋

herokuのエラーログ
2012-06-20T01:49:22+00:00 app[web.1]: [error] application - 
2012-06-20T01:49:22+00:00 app[web.1]: 
2012-06-20T01:49:22+00:00 app[web.1]: ! @zzzzzzzzzz - Internal server error, for request [GET /list_mangas] ->
lay.core.ActionInvoker$$anonfun$receive$1$$anon$1: Execution exception [[SQLException: Timed out waiting for a free available connection.]]
java.sql.SQLException: Timed out waiting for a free available connection.

heroku上の該当のエラーログ

herokuのエラーログ
2012-06-20T01:49:20+00:00 heroku[router]: GET manga-checker.herokuapp.com/assets/js/index.js dyno=web.1 queue=0 wait=0ms service=6ms status=304 bytes=0
2012-06-20T01:49:22+00:00 app[web.1]: [error] application - 
2012-06-20T01:49:22+00:00 app[web.1]: 
2012-06-20T01:49:22+00:00 app[web.1]: ! @zzzzzzzzzz - Internal server error, for request [GET /list_mangas] ->
2012-06-20T01:49:22+00:00 app[web.1]: 
2012-06-20T01:49:22+00:00 app[web.1]: play.core.ActionInvoker$$anonfun$receive$1$$anon$1: Execution exception [[SQLException: Timed out waiting for a free available connection.]]
2012-06-20T01:49:22+00:00 app[web.1]:   at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:82) [play_2.9.1-2.0.jar:2.0]
2012-06-20T01:49:22+00:00 app[web.1]:   at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:63) [play_2.9.1-2.0.jar:2.0]
2012-06-20T01:49:22+00:00 heroku[router]: GET manga-checker.herokuapp.com/list_mangas dyno=web.1 queue=0 wait=0ms service=1016ms status=500 bytes=1930
2012-06-20T01:49:22+00:00 app[web.1]:   at akka.actor.Actor$class.apply(Actor.scala:290) [akka-actor-2.0.jar:2.0]
2012-06-20T01:49:22+00:00 app[web.1]:   at play.core.ActionInvoker.apply(Invoker.scala:61) [play_2.9.1-2.0.jar:2.0]
2012-06-20T01:49:22+00:00 app[web.1]:   at akka.actor.ActorCell.invoke(ActorCell.scala:617) [akka-actor-2.0.jar:2.0]
2012-06-20T01:49:22+00:00 app[web.1]:   at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:179) [akka-actor-2.0.jar:2.0]
2012-06-20T01:49:22+00:00 app[web.1]: Caused by: java.sql.SQLException: Timed out waiting for a free available connection.
2012-06-20T01:49:22+00:00 app[web.1]:   at com.jolbox.bonecp.BoneCP.getConnection(BoneCP.java:503) ~[bonecp-0.7.1.RELEASE.jar:0.7.1.RELEASE]
2012-06-20T01:49:22+00:00 app[web.1]:   at com.jolbox.bonecp.BoneCPDataSource.getConnection(BoneCPDataSource.java:114) ~[bonecp-0.7.1.RELEASE.jar:0.7.1.RELEASE]
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1