1
我有一个Rails 5 API与Sidekiq和capistrano-sidekiq,在过去几个月一直很高兴地工作。Sidekiq无法启动(获得SIGHUP)
有一天,Sidekiq停止了处理工作。检查日志,我看到了
bundler: failed to load command: sidekiq (/home/user/project/shared/bundle/ruby/2.2.0/bin/sidekiq)
SignalException: SIGHUP
/home/user/project/shared/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/core_ext/module/attribute_accessors.rb:119:in `<class:Module>'
/home/user/project/shared/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/core_ext/module/attribute_accessors.rb:6:in `<top (required)>'
... (snip)
每当我尝试启动Sidekiq时,上面都会出现在日志中。它使用安静命令(USR1)关闭并正确退出。
INFO: Received USR1, no longer accepting new work
我正在使用Capistrano进行部署,它一直运行良好,直到发生这种情况。这是Capistrano用来启动Sidekiq的命令:
INFO [2aac3b89] Running $HOME/.rbenv/bin/rbenv exec bundle exec sidekiq --index 0 --pidfile /home/user/project/shared/tmp/pids/sidekiq-0.pid --environment production --logfile /home/user/project/shared/log/sidekiq.log --daemon as [email protected]
DEBUG [2aac3b89] Command: cd /home/user/project/current && (export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.2.3" ; $HOME/.rbenv/bin/rbenv exec bundle exec sidekiq --index 0 --pidfile /home/user/project/shared/tmp/pids/sidekiq-0.pid --environment production --logfile /home/user/project/shared/log/sidekiq.log --daemon)
INFO [2aac3b89] Finished in 1.176 seconds with exit status 0 (successful).
这是怎么回事?我怎样才能确保它未来不会发生?
我有同样的问题。谢谢。 – mike927
https://github.com/seuros/capistrano-sidekiq这里标记了这个错误。 – lingceng