Users are experiencing issues with Sidekiq consuming too much memory and restarting, despite adjusting the UNICORN_SIDEKIQ_MAX_RSS setting. pfaffman reports that even with UNICORN_SIDEKIQ_MAX_RSS set to 1000, Sidekiq restarts when using around 535MB. sam suggests checking if increasing UNICORN_SIDEKIQS results in multiple Sidekiq processes. sandra.mccollum also encounters the same issue on a less busy site and asks for further troubleshooting steps. Additionally, sandra.mccollum and haydenjames discuss whether this is a Sidekiq issue and if it will be fixed, with haydenjames mentioning a similar problem in another thread.
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?