Sidekiq is consuming too much memory even with UNICORN_SIDEKIQ_MAX_RSS adjusted

Continuing the discussion from Sidekiq is consuming too much memory, restarting:

I’ve adjusted the setting and see this in the container:

root@ip-10-4-2-52:/# set|grep SIDE

But I see this in the logs:

Sidekiq is consuming too much memory (using: 535.10M) for 'site', restarting

It would seem like 535.10M < 1000, right? I feel like I must have a typo or something else really silly.

This is a very busy site with 600-800K pageviews/day with 7 (largely idle) web containers running in ECS.

There are 4 CPUs in the task, should I increase UNICORN_SIDEKIQS?

If I run [ENV["UNICORN_SIDEKIQ_MAX_RSS"].to_i, 500].max.megabytes in rails, I get 1048576000, so it seems like Rails should have access to the ENV, but maybe running rails myself is somehow different from the one that gets cranked up on boot?


it looks like you are doing the right thing… if you raise UNICORN_SIDEKIQS to 2 do you see 2 sidekiqs?

1 Like

I’ll try increasing the number of sidekiq next, but I’m confused that it says 538 mb is to much when it’s set for 1000.

1 Like

Agree, just want to see that at least one of the env vars is “sticking”

1 Like