sidekiq

Sidekiq not processing queue

北战南征 提交于 2019-12-20 08:31:29
问题 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 seem to no worker processing jobs. Restarting Redis or flush it with FLUSHALL or FLUSHDB as no effect. Sidekiq has been started with bundle exec sidekiq -L log/sidekiq.log and produces the following log file: 2013-05-30..Booting Sidekiq 2.12.0 using

Invoking a large set of SQL from a Rails 4 application

自作多情 提交于 2019-12-18 11:53:40
问题 I have a Rails 4 application that I use in conjunction with sidekiq to run asynchronous jobs. One of the jobs I normally run outside of my Rails application is a large set of complex SQL queries that cannot really be modeled by ActiveRecord. The connection this set of SQL queries has with my Rails app is that it should be executed anytime one of my controller actions is invoked. Ideally, I'd queue a job from my Rails application within the controller for Sidekiq to go ahead and run the

Sidekiq deploy to multiple environments

。_饼干妹妹 提交于 2019-12-18 10:16:11
问题 (See below for my detailed config, which is the result of Henley Chiu's answer). I've been trying to wrap my brain around Sidekiq deploys, and I am not really getting it. I have an app with a staging environment, and a production environment, on the same server. Everything I see about sidekiq deploys basically say "just add sidekiq/capistrano to your deploy file", so I did that. And then the instructions are "here's a yml file with options" but nothing seems to be explained. Do I need

sidekiq memory usage reset

泪湿孤枕 提交于 2019-12-18 06:56:46
问题 I have Rails app which uses Sidekiq for background process. To deploy this application I use capistrano, ubuntu server and apache passenger. To start and restart Sidekiq I use capistrano-sidekiq gem. My problem is - when Sidekiq is running, amount of memory (RAM) used by Sidekiq is growing up. And when Sidekiq finished all processes (workers) it keeps holding a large amount of RAM and not reseting it. USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND ubuntu 2035 67.6 45.4 3630724 1838232

Scaling sidekiq network archetecture: concurrency vs processes

萝らか妹 提交于 2019-12-14 02:43:52
问题 I'm wondering how to efficiently scale sidekiq on my server. The author says he uses 6 sidekiq processes, each with concurrency set to 25. He also suggests trying concurrency of 50 if you have heavy I/O. What's the difference between adding more processes or increasing concurrency? Which is better for helping my app process more jobs faster? 回答1: I've tested with concurrency as high as 300 but at that level you start to run into trouble with the MRI. Mike, the author, doesn't recommend

Sidekiq: Is it possible to “pause” a queue?

▼魔方 西西 提交于 2019-12-14 02:15:56
问题 Is it possible to "pause" a sidekiq queue? I have a download job running, but I have to travel/hibernate my Mac so I want to tell sidekiq to pause for a bit. Is there a straightforward way to do that? 回答1: You can just gracefully shut sidekiq down by sending a USR1 signal - upon receiving it, it will stop taking new jobs from redis, but complete already running ones See more here But if your task is long-runing and not split into parts or idempodent then you're out of luck 回答2: You cannot

exec sidekiq log on heroku

梦想与她 提交于 2019-12-14 01:35:38
问题 I want to exec the sidekiq log file on my heroku environment but I cannot find anything in the documentation nor google helps me here. I am sure it has to be sth like exec sidekiq -L log/sidekiq.log but that command fails on heroku. How can I access my sidekiq log file on a heroku environment? 回答1: I grabbed the worker logger on heroku heroku logs -t -a eventbaxx-production | grep worker.1 so I could see sidekiq activity. 来源: https://stackoverflow.com/questions/37969031/exec-sidekiq-log-on

Importing chunks of CSV rows with Sidekiq, Resque, etc

故事扮演 提交于 2019-12-13 05:14:04
问题 I'm writing an importer that imports data from a CSV file into a DB table. To avoid loading the whole file into memory, I'm using Smarter CSV to parse the file into chunks of 100 to load each chunk one at a time. I'll be passing each chunk of 100 to a background job processor such as Resque or Sidekiq to import those rows in bulk. Passing 100 rows as a job argument results in a string that's about ~5000 characters long. Does this cause any problems in general or particularly with the back-end

How to detect orphaned sidekiq process after capistrano deploy?

折月煮酒 提交于 2019-12-13 04:44:49
问题 We have a Rails 4.2 application that runs alongisde a sidekiq process for long tasks. Somehow, in a deploy a few weeks ago something went south (the capistrano deploy process didn't effectively stopped it, wasn't able to figure out why) and there was left an orphaned sidekiq process running that was competing with the current one for jobs on the redis queue. Because this process source became outdated it started giving random results on our application (depending on which process captured the

Dynamic domain name in Rails action mailer while using sidekiq

最后都变了- 提交于 2019-12-13 00:43:50
问题 In my requirement ,there are different domain names for single project.I would like to send reset password link with a domain name where the user requested for the reset password.For that I have done the follows in application_controller.rb and it works well. before_filter :set_mailer_host def set_mailer_host ActionMailer::Base.default_url_options[:host] = request.host_with_port $url_host = request.host_with_port end Later,I have used sidekiq for delayed mailer and updated like follows on