Sidekiq database pool size should match number of threads in Geo
in https://gitlab.com/gitlab-org/gitlab-ee/blob/master/config/initializers/sidekiq.rb#L50 we modify the main database pool size to match the number of Sidekiq threads. This stops sidekiq from running out of database connections for its threads (each thread must check out one database connection).
Consequently, the pool size in the Geo config must equal the number of sidekiq threads to keep jobs from failing after a 5-second timeout on the connection pool. We were seeing this a lot on the Geo testbed before manually increasing the pool size to 25.
Increasing this number significantly is not feasible as Unicorn relies on this number as well. Bumping sidekiq to 100 workers requires 100 connections for each unicorn process, in addition to the sidekiq requirement. Those connections are wasted.
Solution: when the sidekiq initializer is run and the Geo tracking database configuration exists, we should override the pool side to match the sidekiq worker pool size, in the same way we do for the main database.
/cc @dbalexandre @stanhu @jarv