百度网站 电影
月曜日, 7月 05, 2010
日曜日, 7月 04, 2010
Rails: MySql lost connection error with Mongrel
- Railsアプリを1日放置しているとMongrelが刺さる問題
- Rails + MySQL (+ Mongrel?) でDB接続の通信が無い状態が続くとデッドロックする。
- TCPSocket#flushでスレッドが停止する現象について
以下のようにいずれかを避けることで問題を回避することができるはずである。
- MySQLのクライアントライブラリを使用したバイナリ版のドライバをインストールする
sudo gem install mysql
gem install mysql -- --with-mysql-dir=/usr/local/mysql - Mongrelの使用をやめ、FastCGIなどにする
- MySQLのコネクションがタイムアウトしないようcron等で定期的にアクセスする
Rails: MySql lost connection error with Mongrel
Mongrel stops responding a few times per days. Restarting Mongrel helps.Q: Mongrel stops working if it's left alone for a long time.Setting timeout to avoid bug in MySQL driver that causes Mongrel stopping to work after a long idle time
If you find that Mongrel stops working after a long idle time and you're using MySQL then you're hitting a bug in the MySQL driver that doesn't properly timeout connections. What happens is the MySQL server side of the connection times out and closes, but the MySQL client doesn't detect this and just sits there.
What you have to do is set:
ActiveRecord::Base.verification_timeout = 14400
Or to any value that is lower than the MySQL server's interactive_timeout setting. This will make sure that ActiveRecord checks the connection often enough to reset the connection.
Mongrel stops responding after period of inactivity
金曜日, 7月 02, 2010
reliable-msg を IPv6 環境で動かすときの注意
reliable-msg を IPv6 環境で動かすときの注意
netstat -a | grep 6438
netstat -an | grep 6438
reliable-msg-1.1.0のインストールとパッチ当て
netstat -a | grep 6438
netstat -an | grep 6438
reliable-msg-1.1.0のインストールとパッチ当て
登録:
投稿 (Atom)