Hi Denis,
I will focus on provide you info about how to increase RSS for Sidekiq.
For this, have a look to the UNICORN_SIDEKIQ_MAX_RSS environment variable (ffi: discourse/config/unicorn.conf.rb at 89d7b1861d1625352e82e82c19f93e7272c965ef · discourse/discourse · GitHub) (e.g., UNICORN_SIDEKIQ_MAX_RSS: 1000) so this will allow you use allocate more memory. In any case, I recommend you decrease a bit the UNICORN_SIDEKIQS value to 1 or 2, unless you have several jobs been enqueued up for long.
I unknow what can be the cause of your sidekiq’s reboots though, normally it just reboots on the background after OOM (according to discourse/config/unicorn.conf.rb at 89d7b1861d1625352e82e82c19f93e7272c965ef · discourse/discourse · GitHub), but check your-forum.com/logs for more info, hope this helps.
Cheers,
Ismael