diff --git a/manifests/config.pp b/manifests/config.pp index 5007126f7..c2be17199 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -88,12 +88,15 @@ # CPU based calculation is based on https://github.com/puma/puma/blob/master/docs/deployment.md#mri # Memory based calculation is based on https://docs.gitlab.com/ee/install/requirements.html#puma-settings + # Capped at 100 because worst case that's 100 * (5 + 4) = 900 PostgreSQL connections for Katello or 100 * 5 = 500 for vanilla Foreman $puma_workers = pick( $foreman::foreman_service_puma_workers, - floor( - min( - $facts['processors']['count'] * 1.5, - ($facts['memory']['system']['total_bytes']/(1024 * 1024 * 1024)) - 1.5 + ceiling(100, + floor( + min( + $facts['processors']['count'] * 1.5, + ($facts['memory']['system']['total_bytes']/(1024 * 1024 * 1024)) - 1.5 + ) ) ) )