Sidekiq Error connecting to Redis on 127.0.0.1:6379 (Errno::ECONNREFUSED) on docker-compose
Check if your redis server is running, start redis by using the following command in the terminal: redis-server
Check if your redis server is running, start redis by using the following command in the terminal: redis-server
Short answer is they are the same thing. ActiveJob calls it a Job whereas Sidekiq calls it a Worker. I’ve decided to keep the terminology different so that people can distinguish the two. You can use either one. Note that ActiveJob does not provide access to the full set of Sidekiq options so if you … Read more
We also faced a similar issue. Looks like someone scanned AWS, connected to all public redis servers, and possibly ran “CONFIG SET REQUIREPASS ””, thus locking down the running instance of redis. Once you restart redis, the config is restored to normal. Best thing would be to use AWS security group policy and block port … Read more
No you do not need any config with Heroku for Sidekiq, just add the RedisToGo plugin and you’re on. Do not forget to attribute at least 1 worker to your app in your Heroku config. Here is my default Procfile: web: bundle exec thin start -p $PORT worker: bundle exec sidekiq -c 5 -v
According to this Sidekiq documentation page to delete a job with a single id you need to iterate the queue and call .delete on it. queue = Sidekiq::Queue.new(“mailer”) queue.each do |job| job.klass # => ‘MyWorker’ job.args # => [1, 2, 3] job.delete if job.jid == ‘abcdef1234567890’ end There is also a plugin called sidekiq-status that … Read more
Please check if sidekiq process is actually running: ps aux | grep sidekiq If it is not, try to run sidekiq in foreground first and check the output. bundle exec sidekiq -e production
To reset statistics: Sidekiq::Stats.new.reset ref: Add reset stats to Web UI summary box and method to API Also, you can now clear specific stats: single stat by Sidekiq::Stats.new.reset(‘failed’) or multiple stats by Sidekiq::Stats.new.reset(‘failed’, ‘processed’) (Thanks https://stackoverflow.com/users/2475008/tmr08c for update)
Put the following into your sidekiq initializer require ‘sidekiq’ require ‘sidekiq/web’ Sidekiq::Web.use(Rack::Auth::Basic) do |user, password| # Protect against timing attacks: # – See https://codahale.com/a-lesson-in-timing-attacks/ # – See https://thisdata.com/blog/timing-attacks-against-string-comparison/ # – Use & (do not use &&) so that it doesn’t short circuit. # – Use digests to stop length information leaking Rack::Utils.secure_compare(::Digest::SHA256.hexdigest(user), ::Digest::SHA256.hexdigest(ENV[“SIDEKIQ_USER”])) & Rack::Utils.secure_compare(::Digest::SHA256.hexdigest(password), … Read more
bundle exec sidekiq -d -L log/sidekiq.log -C config/sidekiq.yml -e production -d, Daemonize process -L, path to writable logfile -C, path to YAML config file -e, Application environment
The reason was in our case: Sidekiq may look for the wrong queue. By default Sidekiq uses a queue named “default”. We used two different queue names, and defined them in config/sidekiq.yml # configuration file for Sidekiq :queues: – queue_name_1 – queue_name_2 The problem is that this config file is not automatically loaded by default … Read more