Run Sidekiq as daemon on Ubuntu

懵懂的女人 提交于 2019-12-31 18:57:08

问题


How can I run sidekiq as daemon on Ubuntu?

If I run bundle exec sidekiq -D I get invalid option: -D, is there any way to run it without some other controller, like god, upstart...?


回答1:


there's an option to Daemonize sidekiq, just pass -d option

commit




回答2:


Running as daemon won't restart the sidekiq if it crashes unexpectedly. One alternate way could be to run sidekiq as a service (An upstart job). If the system is rebooted than also the upstart job will run sidekiq. Here is the complete script and method to run sidekiq as a service.

After running sidekiq as a service you can simply start/stop/restart sidekiq by command sudo service sidekiq start/stop/restart.




回答3:


As of sidekiq 6.0 Daemonization wouldnt work and if you pass -d, you'll get a message:

Daemonization mode was removed in Sidekiq 6.0, please use a proper process supervisor to start and manage your services

check the issue here #4045



来源:https://stackoverflow.com/questions/15520676/run-sidekiq-as-daemon-on-ubuntu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!