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
9
votes
2 answers

Mongoid getting no server is available matching preference

I have a bunch of sidekiq jobs running that are failing with the following error when I'm trying to perform a query to the DB: No server is available matching preference: #
absg
  • 377
  • 5
  • 9
9
votes
3 answers

Starting sidekiq with capistrano

I want to start sidekiq with capistrano. Below is code for that namespace :sidekiq do task :start do run "cd #{current_path} && bundle exec sidekiq -c 10 -e production -L log/sidekiq.log &" p capture("ps aux | grep sidekiq | awk '{print…
sagar junnarkar
  • 1,240
  • 2
  • 10
  • 18
9
votes
3 answers

Redistogo and Sidekiq on Heroku: Can't connect

I had huge issues with starting sidekiq on Heroku after updating my gems and putting everything into production. The problem was that Sidekiq tried to connect to Redis on a local connection and port, instead of using the REDISTOGO variable. After…
Michael Schmitz
  • 1,074
  • 2
  • 12
  • 27
9
votes
1 answer

Mongoid/Moped errors when processing jobs with Sidekiq

I am seeing a ton of jobs failing when running Sidekiq that are all related to connectivity issues with my Mongo database. I'm stress testing the machine with lots of load, so I queued over 18,000 jobs each with a 5 second retry upon failure. Some…
randombits
  • 47,058
  • 76
  • 251
  • 433
9
votes
2 answers

Is there any way to tell sidekiq that one job is dependent on another

Is there any way to tell sidekiq that one job is dependent on another and can't be started until latter is finished?
hasrthur
  • 1,410
  • 15
  • 31
9
votes
2 answers

Possible to avoid ActiveRecord::ConnectionTimeoutError on Heroku?

On Heroku I have a rails app running that with both a couple web dynos as well as one worker dyno. I'm running thousands of worker tasks throughout the day on Sidekiq however occasionally the ActiveRecord::ConnectionTimeoutError is raised…
Nick ONeill
  • 7,341
  • 10
  • 47
  • 61
9
votes
2 answers

Can I get the ID of my sidekiq worker inside the worker?

In sidekiq's log file, I can see IDs of workers, like this: 2013-08-28T10:19:03Z 8911 TID-osy5fnl1o MyWorker JID-262996c2737e7a5ec5c71674 INFO: start 2013-08-28T10:19:03Z 8911 TID-ptes4 MyWorker JID-6830e08b5da72b360d4d1ae2 INFO:…
Ovesh
  • 5,209
  • 11
  • 53
  • 73
9
votes
1 answer

Sidekiq current Celluloid Actor

I need to access the current celluloid actor inside of my Sidekiq worker, but I don't see a way to do that. Whenever I try to call: Celluloid::Actor.current I get an error: not in actor scope I tried to get around finding the current actor by…
ardavis
  • 9,842
  • 12
  • 58
  • 112
9
votes
1 answer

Limit the amount of workers per queue in Sidekiq

I've been trying to limit the amount of workers per queue using the sidekiq-limit_fetch gem, and Sidekiq seems to "see" the imposed limits in the log but when I watch the workers the limits are ignored. Here's the part from the log where Sidekiq…
Philipp
  • 347
  • 3
  • 7
9
votes
2 answers

failed with error 10068: "invalid operator: $oid"

just updated to the latest version of mongoid (3.1.0) and sidekiq (2.7.2) now i'm getting the error : failed with error 10068: "invalid operator: $oid" from looking into the code i see a select like that: @selector={"_id"=>{"$oid"=>"[some id]"}}…
Sagiv Ofek
  • 25,190
  • 8
  • 60
  • 55
9
votes
2 answers

how to detach sidekiq process once started in terminal

I want to run sidekiq on my production server, I am using this command to start the process bundle exec sidekiq -q mailer,5 -q default -e production How do I detach from the process without stopping it, so that I can close the connection to server.
Keviv Vivek
  • 222
  • 3
  • 10
8
votes
0 answers

"Your Redis network connection is performing extremely poorly" warning on localhost

When runnning sidekiq locally (with or without cron jobs) I get this warning: WARN: Your Redis network connection is performing extremely poorly. Last RTT readings were [206649, 404660, 207362, 508564, 508909], ideally these should be < 1000. Ensure…
Clara
  • 2,677
  • 4
  • 16
  • 31
8
votes
1 answer

What is perform_async in sidekiq

I want to know about perform_async in sidekiq. As I could not found any documentation on this while everyone is using this. So can someone please explain this to me or provide a resource.
hjhku
  • 151
  • 1
  • 1
  • 8
8
votes
2 answers

Sidekiq Log Level not being set in production

I'm running Sidekiq with Rails 5.2.3 on AWS Elastic Beanstalk. Following the instructions in the Sidekiq wiki in initializers/sidekiq.rb I've set: Sidekiq.configure_server do |config| config.logger.level = Logger::WARN end This works in the…
8
votes
1 answer

What is the Redis key for a queue in Sidekiq?

I would like to use Datadog to monitor the queue length of some background jobs. Basically I need to know the name of the key that represents a queue in Sidekiq, so that I can monitor it as described…
collimarco
  • 34,231
  • 36
  • 108
  • 142