Created
July 30, 2014 12:22
-
-
Save eccyan/345e8f7e0ada60c99cf2 to your computer and use it in GitHub Desktop.
Resqueでコネクションプールをしない ref: http://qiita.com/eccyan/items/8f7876bba9d18ca2c483
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ mysql YOUR_DATABASE -e 'SHOW PROCESSLIST;' | grep -v + | cut -f 3 | cut -d ':' -f 1 | sort | uniq -c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Clear connection pooling | |
| Resque.after_fork do | |
| ActiveRecord::Base.clear_all_connections! | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment