Closed ShimShtein closed 4 months ago
@pablomh Thanks for all the testing and experimenting. What do you think, is it enough?
Hi @ShimShtein, according to our data, this change should be very welcome :)
These are the results of our testing that justify this change:
could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use
) with different DB pool values when performing concurrent registrations on a "medium" sized Satellite serverBased on this testing, we agree that the minimum Foreman DB pool value where all these issues are addressed is 9.
@ShimShtein This will reset the default value, to really fix this we need to also reset this in the installer through a migration.
@ehelms Added a migration PR: https://github.com/theforeman/foreman-installer/pull/937
@ekohl fixed both here and the installer
Should be a bit more clear now.
According to an investigation described in https://community.theforeman.org/t/rails-connection-pool-size-optimizations/36675 foreman process spawns 4 additional threads that consume DB connection during the startup. Hence the amount of acctive DB connections should be the amount of puma threads + 4 additional threads.