Since updating to latest yesterday I’ve been seeing this error in the logs constantly. My server has 8gb of ram and only 60% used. I tried running discourse-setup to reset my settings, which gave me this:
setting db_shared_buffers = 2048MB
setting UNICORN_WORKERS = 4
Logs:
Message (781 copies reported)
Sidekiq is consuming too much memory (using: 510.87M) for 'community.naturephotographers.network', restarting
Backtrace
config/unicorn.conf.rb:164:in `check_sidekiq_heartbeat'
config/unicorn.conf.rb:244:in `master_sleep'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/unicorn-6.1.0/lib/unicorn/http_server.rb:295:in `join'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/unicorn-6.1.0/bin/unicorn:128:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/3.2.0/bin/unicorn:25:in `load'
/var/www/discourse/vendor/bundle/ruby/3.2.0/bin/unicorn:25:in `<main>'
Any ideas what may be going on here?
5 Me gusta
Don
3 Octubre, 2023 19:54
2
Increase the Sidekiq memory fixed it for me.
Also, if your server has enough total RAM, you can increase the memory allocation for Sidekiq.
Place this in the env: section of app.yml:
UNICORN_SIDEKIQ_MAX_RSS: 1000
The default maximum is, I believe, 500mb.
7 Me gusta
If it’s any consolation I get this too, fairly regularly.
I’ll investigate @Don ’s suggestion. I did wonder! Now I know!
4 Me gusta
That seems to have done the trick, thank you Don!
4 Me gusta
Is this a case of “not enough headroom” or do we think this is a memory leak of some kind?
If the latter then surely this error will pop up anyway and increasing the memory allocated will just reduce the error frequency …
FWIW I still haven’t seen the error and my memory usage went up about 400 MB after changing this setting.
1 me gusta
Jagster
(Jakke Lehtonen)
4 Octubre, 2023 15:37
7
I’m a wondering this:
I get same error ( or should it count more as informative?) and mine is not multisite nor busy.
Is achitecture changed over the times and we are near old topic do we need more menory than told ?
1 me gusta
Don
4 Octubre, 2023 17:00
8
This warning appeared in my /logs
after I actived YJIT but there is a note it is increase memory usage. However I think it can also happen busy sites with lots of activity or busy shared servers with shared memory etc…
3 Me gusta
the Sidekiq dashboard appears to show memory use for Redis, shame it doesn’t do the same for Sidekiq itself?:
Just a little update here, since making the change my memory usage jumped from around 60% to 80% (8 GB) and holding steady. I haven’t seen another error in the logs and some other issues have cleared up as well.
2 Me gusta
system
(system)
Cerrado
9 Noviembre, 2023 19:15
11
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.