Perhaps this is because of how restarting the unicorn. Not every worker reboots immediately. This is done in order to have zero downtime and to lose any requests. If you want to accurately see your changes, try stopping and then launching the application. I had to do this several times. Of course, you may lose some query.
The following tasks are what I use to restart, stop, and start my unicorn server.
desc "Zero-downtime restart of Unicorn" task :restart, :except => { :no_release => true } do run "kill -s USR2 `cat #{shared_path}/pids/unicorn.pid`" end desc "Start unicorn" task :start, :except => { :no_release => true } do run "cd #{current_path} ; bundle exec unicorn_rails -c config/unicorn.rb -D -E production" end desc "Stop unicorn" task :stop, :except => { :no_release => true } do run "kill -s QUIT `cat #{shared_path}/pids/unicorn.pid`" end
Hope this helps you.
Perhaps this article is of interest.
source share