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

What is the recommended maximum size for a Sidekiq job payload?

What would be the recommended maximum size for a job payload? As a specific example, is a HTML document comprised of 500kb to 1Mb of text too large to be passed in to a job payload? Since Sidekiq is backed by redis I'd say 512Mb, but I wonder if…
jdscosta91
  • 706
  • 1
  • 8
  • 16
8
votes
2 answers

ActiveJob::DeserializationError: Error while trying to deserialize arguments

I am trying to send mail in production but it is throwing Activejob deserailization error.sidekiq is running in background. I have added sidekiq gem. I wrote one method in comment_notification.rb for sending email to the user. Then in controller in…
asha
  • 139
  • 1
  • 6
8
votes
4 answers

Using Sidekiq for Active Job and getting ActiveJob::DeserializationError

I'm trying to use Sidekiq to run the below job. The job performs fine when not queued (perform_now) but fails when called as (perform_later), which uses Sidekiq. AddEmployeesToRoomJob.perform_now room ## works…
Tamlyn R
  • 211
  • 3
  • 9
8
votes
1 answer

Rails, Sidekiq - Redis NOAUTH

I use sidekiq on rails for sending out emails. I've added a password for the redis server but cant seem to get it right because I get an error D, [2015-12-10T16:49:52.714279 #10497] DEBUG -- : (0.5ms) COMMIT I, [2015-12-10T16:49:52.720380…
Philip
  • 6,827
  • 13
  • 75
  • 104
8
votes
1 answer

perform_async not working in sidekiq

I'm trying to use sidekiq to process some requests in background (it's integrated with padrino framework). My expectation was that once the worker got called, the request handler would return immediately the answer to user. In order to be sure it…
Plicatibu
  • 1,692
  • 2
  • 19
  • 20
8
votes
3 answers

Concurrency using Sidekiq is causing some problems

I am using Sidekiq in my rails app to queue up 50k+ jobs at a time. Our pool size is set to 9. The jobs are all related and do the same thing. We have another model that has a counter on it. During each job, we check to see if that model has a…
Matthew Berman
  • 8,481
  • 10
  • 49
  • 98
8
votes
1 answer

Date object turns into String when using Sidekiq

I have a problem that when I pass some Date objects as arguments to different methods, they turn into String. In my Rails app, there is a service that calls a Sidekiq worker to execute a method in a model. When the service object is initialized, it…
mc9
  • 6,121
  • 13
  • 49
  • 87
8
votes
2 answers

How to test Devise Async with Sidekiq?

Thanks in advance! Sidekiq is working just fine, but I cannot manage to test it with Devise Async, or should I say that I cannot test the latter? According to Sidekiq's documentation, when test mode is set to fake!, any job given to a worker is…
8
votes
3 answers

Sidekiq jobs stuck in queue on Heroku

I have a Sidekiq worker functioning well locally, but when deployed to Heroku the jobs get stuck in the queue. I am using Redis-to-go nano and have it up and running, and I have scaled the worker to 1 on Heroku and can see that it is up. I am just…
Andy Weiss
  • 405
  • 5
  • 15
8
votes
2 answers

Sidekiq won't shut down after Ctrl+C

I'm using Sidekiq for background operations of my Rails 4.1 app. When I type Ctrl+C to shutdown Sidekiq, Sidekiq catches the signal but seems to freeze after this last log line: ^C2014-09-18T16:17:19.194Z 20686 TID-ovwtinh0g INFO: Shutting…
Mick F
  • 7,312
  • 6
  • 51
  • 98
8
votes
4 answers

Sidekiq: NoMethodError: undefined method `perform'

Here is what I am trying to do: 2.1.2 :001 > UpdateStyleRanks.perform_async Here is the error: NoMethodError: undefined method `perform' for # Here is my worker: # app/workers/update_style_ranks.rb class…
Abram
  • 39,950
  • 26
  • 134
  • 184
8
votes
1 answer

Calling/scheduling sidekiq worker from them selves

Is there any other way to reschedule sidekiq worker than calling perform_in or perform_at from their own perform method? Is this viable? class TestWorker include Sidekiq::Worker sidekiq_options retry: false def perform if something …
Matjaz Muhic
  • 5,328
  • 2
  • 16
  • 34
8
votes
3 answers

Rails: Cancelling a scheduled job in Sidekiq

So I have a Sidekiq worker in my model which looks like this: class Perk < ActiveRecord::Base include Sidekiq::Worker include Sidekiq::Status::Worker after_save :update_release_time def update_release_time if self.release_time_changed? #if…
geekchic
  • 2,371
  • 4
  • 29
  • 41
8
votes
2 answers

Jobs processing in background from web application

I want to schedule and run a lot of jobs in the background during a web application execution. The web app is built on top of Symfony 2 and Doctrine 2. I know the job-processing can be done with libraries like Resque or Sidekiq. However, these…
Stefano
  • 3,213
  • 9
  • 60
  • 101
8
votes
2 answers

Sidekiq server not loading configuration file

I'm trying to setup sidekiq with my sinatra application, and I'm having trouble starting up the sidekiq workers to run in the daemon mode, with a configuration file. My project has the following structure: project - config -- sidekiq.yml #Sidekiq…
Myles Merrell
  • 246
  • 3
  • 12