Skip to content

unicorn service can't be restarted and new routes are not found after deployment #45

@benams

Description

@benams

My server is ubuntu 14.04. I can't see the unicorn service in /etc/init.d, and I can't service unicorn restart or service unicorn_myapp restart. Otherwise - the process id remains the same as it was, while the workers' process ids are changed ( I don't really know what it means)

The only way to restart and get a new process id is to kill -9 <process_id> and then to cap production deploy again.
If I don't do so, each time I add a new route it just can't be found...

  1. Do you know why the route is not found?
  2. Does it make sense that I can't restart the service?

Here is my capistrano deploy script:

set :application, 'myapp'
set :repo_url, 'git@10.0.0.101:/opt/git/myapp.git'

ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }.call

set :use_sudo, false
set :bundle_binstubs, nil
# set :linked_files, fetch(:linked_files, []).push('config/mongoid.yml')
set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', 'public/system')

after 'deploy:publishing', 'deploy:restart'

namespace :deploy do
  task :restart do
    invoke 'unicorn:reload'
  end
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions