11th Sat
RailsでDBの接続が切れた場合に再接続する設定
昔は
mysql_retry_lost_connection
というものがあったのですが、最近 (Rails-2.3以降) は config/database.yml の中で
yaml>>
production:
reconnect: true
<<--
とやるだけで、接続が切れた場合に再接続してくれるようです。
まあ、ここまで用意するならデフォルトでそうなってても良いと思うんですけどね。
posted by
genki on Sat 11 Jun 2011 at 07:03 with 0 comments