I have a Rails project that uses Sidekiq for worker tasks, and Sidekiq-Cron to handle scheduling. I am running into a problem, though. I built a controller (below) that handled all of my API querying, validation of data, and then inserting data into
A user can upload multiple files in my system via a web interface that is handled by a controller action. def import paths = params[:files].map(&:path) if params[:files].present? if paths @results = MyRecord.create_from paths end redirect_to confirma
Is it possible to prevent sidekiq deletion and creation of jobs/queue for specific users? We are using sidekiq with ruby on rails.While I am not sure how to do this within the gem, you should be able to create a fork of the gem and add checks in the
I have a Rails 4 app deployed on Digital Ocean using Ubuntu 14.04.5 LTS. The app seems to run fine but the system runs at 95% memory all the time. I even upgraded the droplet to double the RAM and it's still at 95%. Here is my top output: top - 11:03
I have a model file 'abc.rb' inside model directory. class Abc class << self //codes end end There are certain methods in the abc.rb file that I want to call to in my workers/bulk_uploader.rb file. I got an error while calling it like Abc.some_metho
Once upon a time, I had one app - Cashyy. It used sidekiq. I deployed it and used this upstart script to manage sidekiq (start/restart). I decide to deploy another app to the same server. The app (let's call it Giimee) also uses sidekiq. And here is
I have two Sidekiq jobs. The first loads a feed of articles in JSON and splits it into multiple jobs. It also creates a log and stores a start_time. class LoadFeed include Sidekiq::Worker def perform url log = Log.create! start_time: Time.now, url: u
I am using sidekiq to run some job after creating a record. when the job tries to find the record with the created ID, there are random cases where it raises a RecordNotFound. how can this be possible? class Person def self.test_create p = Person.cre
I updated from Gitlab 7.11 to 8.0. Due to lack of space on the root partition, I uninstalled Gitlab 7 via sudo gitlab-ctl uninstall and installed 8 via sudo apt-get install gitlab-ce I had a few other problems that I found solutions for online and ha
My Rails 4.1 application uses Sidekiq to run measurements in Celluloid actors. It continously runs out of database connections. It appears that Sidekiq opens 2 connections per job, and old connections never get closed properly. What the system does E
I have a Rails system in which every half hour, the following is done: There are 15 clients somewhere else on the network The server creates a record called Measurement for each of these clients The measurement records are configured, and then they a
I have implemented scheduled notifications using Sidekiq. I want to also add an ability of rescheduling jobs that haven't been run yet. I do see a reschedule method in the sidekiq api code https://github.com/mperham/sidekiq/blob/061068c551bd96eb6aa79
I've experienced an odd behavior in my heroku rails app that I've been fighting for two days and still cannot grasp that the problem is. I have a heroku rails app, with a feature that allows user to upload photos. The photo upload feature works fine
I want to perform some tasks in background but with something like "run as". In other words, like a task was launched by the user from the context of his session. Something like def perform env['warden'].set_user(@task_owner_user) MyService::cur
I use Sidekiq and this below is my code: authentications_controller.rb: def auth_provider auth, user .... .... Facebook.loop_import fb_user, 'POST', user end Facebook.rb: def self.loop_import(fb_user, type, user) fb_user.posts({:locale => user.langua
I am using sidekiq gem to run API calls in background. I ran sidekiq in Daemon process like: bundle exec sidekiq -d Now I made some changes in my method, so I want to restart sidekiq. I tried to kill the sidekiq by using the below command: kill -9 pr
I am new to sidekiq, i just created sidekiq worker, when i run the sidekiq worker, it executes only the first rake task I want to execute single rake with two different combinations of arguments e.g def perform Rake::Task['test:fetch'].invoke("foo&qu
I am trying to debug sidekiq at low level. In order to do this I want all queries to be logged. Redis client logger can be enabled with: redis.client.logger = Logger.new(STDOUT) redis.set('a', 'b') Results in: D, [2014-05-13T11:35:34.787624 #46689] D
I have a server with apache + passenger. How will I run sidekiq in production? Any configuration needed to run the bundle exec sidekiq Thanksbundle exec sidekiq -d -L log/sidekiq.log -C config/sidekiq.yml -e production -d, Daemonize process -L, path
My database is very cpu constrained, and I can't find the root cause of the issue. I currently have two applications servers each wit a Rails api connecting to PostgreSQL via the ruby-pg gem. Both application server also have sidekiq running backgrou
I realize there is a push_bulk option for sidekiq but I'm currently being limited by latency to redis, so passing multiple items via push_bulk still isn't going quickly enough (only about 50/s). I've tried to increase the number of redis connections
I'm trying to push some jobs onto a Sidekiq queue, which up until now, worked just fine. The error only appears in production. Stack trace: 2013-12-13T20:35:04Z 22616 TID-amwho INFO: Sidekiq client with redis options {} /home/avishai/apps/XXX/shared/
I have a RoR app with background jobs using whenever and sidekiq gems. In development environment when I launch sidekiq with local redis instance (on localhost) the job keeps getting executed without problems. But when I switch to a remote redis inst
I'm currently using Sidekiq as a solution to send email asynchronously on Rails 4. But now that Rails is Threadsafe by default, is this a good solution to replace Sidekiq by a new Thread ? Is that solution safe or inappropriate ? Thanks JDRails 4 bei
I want the following workflow: visit /projects/new attach 1GB video file click 'submit' video file uploads to S3 in background while user browses rest of site I've been using S3_file_field gem up intil now, which lets me upload directly to S3. But my
I have a backend Rails server with Sidekiq, which serves as API server. The app works as follow: My Rails server receives many requests from incoming API clients at the same time. For each of these requests, the Rails server will allocate jobs to a S
I need to add a job to the Sidekiq queue when my Rails app starts, to update some data, but I don't know where is the best place to do it. Right now, I've wrote this on my application.rb: class Application < Rails::Application config.after_initialize
I have a rails app that fetches a lot of emails from multiple IMAP accounts. I use sidekiq to handle the jobs. I use sidetiq to schedule the jobs. I use redis-semaphore to ensure that recurring jobs for the same user don't stumble upon each other. 2
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?To reset processed jobs: Sidekiq.redis {|c| c.del('stat:processed') } and to reset failed
(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