I am using sidekiq with my Rails app on Heroku mainly for processing mail (ActiveJob). I have been using sidekiq 3.x contently for the past year or so. Recently, we got more traffic on our application and as we saw memory usage nearing the allotted max of 512MB, we decided to update to sidekiq 4.0.1.
I was expecting to see a great reduction in memory usage on the sidekiq dyno, but instead observed exactly the opposite! I eventually had to upgrade the dyno to 1GB mem.
Now, I really want to investigate what is causing this increase in memory usage, but I don't know exactly where to start. The only change I made is updating the gems that were considered leaky, according to this: https://github.com/ASoftCo/leaky-gems
Anyone, got some good advice how to track memory usage of the heroku dyno that is running sidekiq? I have sidekiq running with the default concurrency of 25 and connected to the redis-cloud addon provided by heroku.
Reduce the concurrency. More concurrency == more memory usage.