Sidekiq rails in production

Asked

Viewed 563 times

3

I’m trying to put and produce an APP that uses Redis and Sidekiq to queue up. In development it works as follows. I run the command on the terminal:

bundle exec sidekiq -q default

I’ll keep it rolling. When I send the processes to the queue, Rails automatically executes the Jobs. But on the production server I could not make work the same way. even because the connection is SSH. I don’t know if you have who to configure the start command of the consumption, inside the Rails itself. Or if it is in the same way as in development, opening a terminal with SSH connection and leaving it there running. But then I fall into another doubt. what if the server restarts? Both Redis server and sidekiq are running manually. My Web Server is Apache2 and Passenger. Ruby version 2.2.3 and Rails 4.2.3

1 answer

4


In Production you should run Sidekiq in background (through the -d parameter) and also indicate the file where the sidekiq log will be saved.

bundle exec sidekiq -d -L sidekiq.log -e production

Where you’re going to run it depends a lot on how you’re doing this deploy. If it’s in Pistrano, there are the Hooks to run for you.

  • It worked. I had tried with -d but was giving error. I believe it was because I had not indicated the log file. Thank you very much Pedro Moreira Mamede

Browser other questions tagged

You are not signed in. Login or sign up in order to post.