I am using sidekiq gem to move my heavy reporting jobs to background. The problem is that sidekiq does not release memory even after a job is completed and it is causing an ever increasing memory bloat, resulting in sidekiq restart after every 4-5 jobs. I have tried ActiveRecord::Base.uncached and even tried this in my application.rb - config.middleware.delete "ActiveRecord::QueryCache" but still no use. Even GC.start is not working. How do I clear memory after every job?
Aucun commentaire:
Enregistrer un commentaire