
You should never bump UNICORN_SIDEKIQS that high, only increasing workers but
This should never happen.
The possibilities are:
- You are constrained on resources because either
a) Your site has over grown the server resources
b) You are misallocating resources - There is a bug somewhere in the stack
I’d start making
UNICORN_SIDEKIQS: 1
DISCOURSE_SIDEKIQ_WORKERS: 20
which should release some RAM from your server.
For further information you will need to run the offending jobs in a PostgreSQL console and report what is the bottleneck.