Skip to content

Instantly share code, notes, and snippets.

@eccyan
Created July 30, 2014 12:22
Show Gist options
  • Select an option

  • Save eccyan/345e8f7e0ada60c99cf2 to your computer and use it in GitHub Desktop.

Select an option

Save eccyan/345e8f7e0ada60c99cf2 to your computer and use it in GitHub Desktop.
Resqueでコネクションプールをしない ref: http://qiita.com/eccyan/items/8f7876bba9d18ca2c483
$ mysql YOUR_DATABASE -e 'SHOW PROCESSLIST;' | grep -v + | cut -f 3 | cut -d ':' -f 1 | sort | uniq -c
# 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