Questions tagged [sidekiq]

Sidekiq is a background processing framework for Ruby.

Sidekiq is a multi-threaded background job and message processing gem written by Mike Perham and is available on GitHub.

2372 questions
165
votes
12 answers

How to clear all the jobs from Sidekiq?

I am using sidekiq for background tasks in Rails application. Now the numbers of jobs becomes more, so I want to clear all the jobs. I tried the following command in console Sidekiq::Queue.new.clear but it was giving following error. NameError:…
Can Can
  • 3,644
  • 5
  • 32
  • 56
136
votes
5 answers

Clear sidekiq queue

I've this worker that runs for ever. class Worker include Sidekiq::Worker sidekiq_options queue: "infinity", retry: true def perform(params) # ... self.class.perform_in(30.seconds, params) end end The problem is that I load workers…
Linus Oleander
  • 17,746
  • 15
  • 69
  • 102
133
votes
2 answers

Resque vs Sidekiq?

I am currently using Resque for my background process but recently I heard a lot of huff-buff about sidekiq. Could anybody compare/differentiate? In particular I would like to know is there a way to monitor programmatically whether a job is…
Bhushan Lodha
  • 6,824
  • 7
  • 62
  • 100
110
votes
10 answers

Are there console commands to look at whats in the queue and to clear the queue in Sidekiq?

I'm used to using delayed_jobs method of going into the console to see whats in the queue, and the ease of clearing the queue when needed. Are there similar commands in Sidekiq for this? Thanks!
perseverance
  • 6,372
  • 12
  • 49
  • 68
84
votes
3 answers

Get sidekiq to execute a job immediately

At the moment, I have a sidekiq job like this: class SyncUser include Sidekiq::Worker def perform(user_id) #do stuff end end I am placing a job on the queue like this: SyncUser.perform_async user.id This all works of course but there is…
dagda1
  • 26,856
  • 59
  • 237
  • 450
75
votes
13 answers

Sidekiq not processing queue

What possible reasons can Sidekiq prevent from processing jobs in the queue? The queue is full. The log file sidekiq.log indicates no activity at all. Thus the queue is full but the log is empty, and Sidekiq does not seem to process items. There…
0x4a6f4672
  • 27,297
  • 17
  • 103
  • 140
64
votes
3 answers

How to run sidekiq in production server?

I have a server with apache + passenger. How will I run sidekiq in production? Any configuration needed to run the bundle exec sidekiq Thanks
Debadatt
  • 5,935
  • 4
  • 27
  • 40
63
votes
8 answers

How can I password-protect my /sidekiq route (i.e. require authentication for the Sidekiq::Web tool)?

I am using sidekiq in my rails application. By Default, Sidekiq can be accessed by anybody by appending "/sidekiq" after the url. I want to password protect / authenticate only the sidekiq part. How can i do that?
sagar junnarkar
  • 1,240
  • 2
  • 10
  • 18
62
votes
7 answers

How do I reset my sidekiq counters?

In my sidekiq dashboard, I see on the left a box with the counters Processed 168 Failed 111 Busy 0 Scheduled 0 Retries 0 Enqueued 0 How do I reset them all to 0?
AgostinoX
  • 7,477
  • 20
  • 77
  • 137
57
votes
8 answers

how to delete a job in sidekiq

I am using sidekiq in my rails app. Users of my app create reports that start a sidekiq job. However, sometimes users want to be able to cancel "processing" reports. Deleting the report is easy but I also need to be able to delete the sidekiq job as…
Matthew Berman
  • 8,481
  • 10
  • 49
  • 98
57
votes
7 answers

Sidekiq jobs stuck in enqueue

Sidekiq has been working in development mode just perfectly. Now that I am trying to use it in production, all the jobs are just sitting in enqueue and aren't ever being run. Could anyone point me in the right direction as to how to solve this…
groffcole
  • 871
  • 1
  • 7
  • 18
54
votes
11 answers

Redis raises "NOAUTH Authentication required" error but there is no password setting

I got error NOAUTH Authentication required when I connect to Redis server via command: redis-cli and run ping to check if Redis is working. I found answer for NOAUTH Authentication required error which describes that this error only happens when…
Thanh
  • 8,219
  • 5
  • 33
  • 56
54
votes
7 answers

Rails: Starting Sidekiq on Heroku

I'm having a problem getting Sidekiq up and running on my Heroku deployed Rails app. I have my app working fine in development (and on Heroku without Sidekiq). I created a Procfile with: worker: bundle exec sidekiq If I run heroku ps, the only…
Greg Rogers
  • 1,011
  • 2
  • 8
  • 15
53
votes
8 answers

Sidekiq Error connecting to Redis on 127.0.0.1:6379 (Errno::ECONNREFUSED) on docker-compose

I'm trying to run sidekiq worker with Rails. When I try to docker-compose up worker I get the following error: worker_1 | Error connecting to Redis on 127.0.0.1:6379 (Errno::ECONNREFUSED) worker_1 |…
whatAboutJohn
  • 743
  • 1
  • 9
  • 16
52
votes
4 answers

Sidekiq Rails 4.2 Use Active Job or Worker? What's the difference

This is my first processing jobs asynchronously I am implementing Sidekiq for background processing in my app. I will use it for reminder emails and in-app notifications. I am confused as to whether I should use Active Job to create a job that…
1
2 3
99 100