I am using this command
bundle exec sidekiq -d
to run sidekiq server on the background. getting this error message
ERROR: Daemonization mode was removed in Sidekiq 6.0, please use a proper process supervisor to start and manage your services.
sidekiq run but not in the background. After closing the console sidekiq automatically close.
You may also think about using process manager like overmind which will help you manage multiple processes (for instance server and sidekiq)
https://github.com/DarthSim/overmind
There are other tools around the web, this is my personal choice.
You need to open another terminal tab, in ubuntu ctrl + shift + T and run command
bundle exec sidekiq start
It is removed from the latest versions of Sidekiq to promote users to learn the newer, better ways. Here is the link to the discussion on the same.
The discussion suggested using a process supervisor like systemd, upstart, foreman, etc. to manage Sidekiq.
So you need to write your own service file to start, stop sidekiq. For the reference, here is the link to example service of sidekiq.
https://github.com/mperham/sidekiq/blob/master/examples/systemd/sidekiq.service
You didn't mention the operating system so I'll just go with ubuntu production VM. You're going to want to setup sidekiq with something like systemd or upstart. Sidekiq has some example configurations to get you started https://github.com/mperham/sidekiq/tree/master/examples.
I haven't done this on a mac before, but a quick google and found this Start sidekiq automatically on OSX.
Related
So, I renamed several dangerous Redis commands in redis.conf, after that Sidekiq WEB UI stopped showing any statistics yet Sidekiq is functioning fine. My question is which Redis commands does Sidekiq use? Which should I specify are renamed when configuring server and client inside Sidekiq initializer?
There is no canonical list but the current Sidekiq supports Redis 2.8 so none of the newer commands in 3.0+.
We have rails app that is running some foreman processes with bundle exec foreman start, and have googled a lot of different things, and found that the common suggestion is to set up another background process handler, and export the processes there. So essentially let someone else do foreman's job of managing the processes.
My question is how do you simply stop or restart foreman processes, as I don't really want to try to export the processes to another manager.
Shouldn't there be a simple: foreman restart
Since there is a: foreman start
Is there a snippet or some other command that anyone has used to restart these processes?
Any help or explanation of the foreman tool would be appreciated.
Used monit to control stop and start of foreman processes.
I have a rails application that needs to communicate with a background java application using DBus. Is it possible to do this on heroku or will I need VPS hosting?
To use DBus, both applications need to be running inside the same operating system
I have only run rake jobs on herokus cron that is called 'Heroku Scheduler' but if you can load the java app on heroku you should be able to do it
Heroku handles Cron jobs via its own add on called Scheduler. You can read how to use it here: https://addons.heroku.com/scheduler
How can I test sidekiq running on remote server? I can start sidekiq:
RAILS_ENV=production bundle exec sidekiq
but I don't know if it work or not. I don't use capistrano, I can use only cron.
I'm not sure this question makes a whole lot of sense. Have you gotten it running on your local development machine? If so, you should be able to do the same thing to test it remotely. Set up a job for it to run in the background, then ssh into your gear and use top or ps -ef to see if the process runs.
In my production server, I'm using ruby foreman to run multiple processes, I just want my application to keep working, even if one of the processes down, I want my processes to keep working even if one down , is there any tricky way to restart the process or even not to stop all the processes in case one went down ? I mean in production level I want the solution to be stable enough, is that possible without Upstart ? thanks in advance
You should not be using foreman itself for production - it is only intended as a development tool. Instead, you can use something like god with my foreman_god gem in production.
Alternatively, you can use foreman to export config files for other process monitoring systems, for example upstart.
You can monitor your foreman process with another program like http://mmonit.com/monit/. But somehow you'll find that monitoring a process which monitor other processes is kinda strange.