3

I have an issue with my Sidekiq worker leaking memory on staging on Heroku.

We do not have this issue on production where we run:

ruby 1.9.3
rails 3.2.13
sidekiq 2.12.1
celluloid 0.14.1

On staging we have an upgrade branch:

ruby 2.0.0 rails 4.0.0 sidekiq 2.14.1 celluloid 0.14.1

Using Heroku's memory log you can see that overtime the memory_cache keeps increasing.

enter image description here

I am about 95% sure it isn't our code. The worker code is the same and even if you remove the worker code and just queue workers that just read from the database, there is a memory leak. I am using find_each even though the worker would only pull in a handful of records (~10).

Any tips or suggestions on how to track this down further would be helpful. My next step is to create a blank rails project and heroku application to see if I can get the memory to leak.

Community
  • 1
  • 1
JB.
  • 645
  • 1
  • 6
  • 10
  • Did you ever find out the source of the problem? I'm having similar issues and don't know where to start to "debug" the problem... – Syl Nov 05 '13 at 09:29
  • 1
    I never found the underlying issue. We have subsequently changed how we run the task that was causing the memory leak. Heroku support was absolutely not helpful. It was a rather disappointing experience. – JB. Dec 14 '13 at 01:11
  • @JB Can you share what mem leak prevention measures you followed? – RAJ Dec 15 '14 at 10:27
  • similer issue: https://stackoverflow.com/questions/18978396/sidekiq-not-deallocating-memory-after-workers-have-finished – Oshan Wisumperuma Mar 13 '19 at 06:41

0 Answers0