GabeStah / vcp

0 stars 0 forks source link

Sidekiq processor usage capping near 100% #99

Open GabeStah opened 9 years ago

GabeStah commented 9 years ago

Assumed to be related to Sidetiq + ice_cube known issue: https://github.com/tobiassvn/sidetiq/wiki/Known-Issues

Solution is to set recurrence explicitly:

class MyWorker
  include Sidekiq::Worker
  include Sidetiq::Schedulable

  recurrence { hourly.minute_of_hour(0, 15, 30, 45) }
end
GabeStah commented 9 years ago

Also set recurrence config:

Sidetiq.configure do |config|
  # Clock resolution in seconds (default: 1).
  config.resolution = 0.5

  # Clock locking key expiration in ms (default: 1000).
  config.lock_expire = 100

  # When `true` uses UTC instead of local times (default: false).
  config.utc = false

  # Scheduling handler pool size (default: number of CPUs as
  # determined by Celluloid).
  config.handler_pool_size = 5

  # History stored for each worker (default: 50).
  config.worker_history = 50
end