Thanks for getting back.
Following are the related configurations we have:
- DISCOURSE_DB_POOL: “15”
- DISCOURSE_SIDEKIQ_WORKERS: “10”
- UNICORN_SIDEKIQS: “2”
This means we have 2 Sidekiq processes, each with 10 threads.
The graph shows the current number of client connections.
We are trying to configure the size of the connection pool (RDS proxy sitting in front of PostgreSQL) correctly. To do so, we need a better understanding of the connection pooling on the application side. Why is the application not respecting the DISCOURSE_DB_POOL config as expected?
If DISCOURSE_DB_POOL is working as expected, why do we see such big spikes in DB connections? These spikes seem to be aligned with the PeriodicalUpdates scheduled job runs.
Please let me know if you have more questions. Appreciate the help to uncover the mystery.