Last active
January 13, 2018 07:37
-
-
Save harshalbhakta/a80c76c14055ffe4c98a to your computer and use it in GitHub Desktop.
Unicorn doesn't pick changes after deployment. Hard restart. (Rails, Nginx, Unicorn & Capistrano)
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
| #-- local machine | |
| $ cap production unicorn:stop | |
| $ cap production nginx:stop | |
| $ ssh deployer@example.com | |
| #-- server | |
| $ rm ~/apps/:app_name/current/tmp/pids/unicorn.* | |
| $ rm /tmp/unicorn.:app_name.sock | |
| # Helpful when code chagnes don't reflect after cap deploy. | |
| # Old unicorn processes keep serving previous version. | |
| $ ps aux | grep 'unicorn' | awk '{print $2}' | xargs sudo kill -9 | |
| #-- local machine | |
| $ cap production unicorn:start | |
| $ cap production nginx:start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment