SidekiqがUNICORN_SIDEKIQ_MAX_RSSを調整してもメモリを過剰に消費する

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
UNICORN_SIDEKIQS=1
UNICORN_SIDEKIQ_MAX_RSS=1000

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?

「いいね!」 2

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

「いいね!」 1

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

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

「いいね!」 1

Was there any resolution to this, as I see in my logs:

Sidekiq is consuming too much memory (using: 501.37M) , restarting

UNICORN_SIDEKIQ_MAX_RSS: 1000

and the site is not a very busy one

What else should I try?

「いいね!」 1

Is this a Sidekiq issue, and whether it is nor not, will this issue be fixed?

Job exception: MiniScheduler::DistributedMutex::Timeout
We 6:21 pm

mini_scheduler-0.17.0/lib/mini_scheduler/distributed_mutex.rb:43:in `synchronize' 
mini_scheduler-0.17.0/lib/mini_scheduler/distributed_mutex.rb:15:in `synchronize' 
mini_scheduler-0.17.0/lib/mini_scheduler/manager.rb:365:in `lock' 
mini_scheduler-0.17.0/lib/mini_scheduler/manager.rb:316:in `tick' 
mini_scheduler-0.17.0/lib/mini_scheduler.rb:76:in `block (2 levels) in start' 

Posted by NateDhaliwal:

「いいね!」 1