I am getting ActiveRecord::ConnectionTimeoutError once or twice in a day. could someone help me in calculating how many connections my application is making to my DB? and suggestion to optimise my connections?
Here is my configuration
AWS
Database : Mysql
Version : 5.7.23
Provider : AWS RDS (db.m5.large, vCPU: 2, RAM: 8GB)
3 servers with bellow configurations
# database.yml
pool: 20
# puma.rb
RAILS_MAX_THREADS : 5
WEB_CONCURRENCY : 2
1 sidekiq server with bellow configuration
# sidekiq
concurrency: 25
I tried to get max number of connection my DB is able to handle
# MySQL Max connections ("show global variables like 'max_connections';")
624