Skip to content

Add httpd MPM event module configuration#483

Merged
ehelms merged 3 commits intotheforeman:masterfrom
pablomh:httpd-mpm-event
May 6, 2026
Merged

Add httpd MPM event module configuration#483
ehelms merged 3 commits intotheforeman:masterfrom
pablomh:httpd-mpm-event

Conversation

@pablomh
Copy link
Copy Markdown
Contributor

@pablomh pablomh commented May 3, 2026

Why are you introducing these changes? (Problem description, related links)

foremanctl does not manage the Apache MPM event module configuration.
Without an explicit event.conf, httpd uses its compiled-in defaults:
ServerLimit=16, ThreadsPerChild=25, MaxRequestWorkers=400.

In foreman-installer deployments, puppet-apache sets base defaults of
ServerLimit=25 and ThreadsPerChild=16 (with MaxRequestWorkers
derived automatically as ServerLimit * ThreadsPerChild). The tuning
profiles then override these to ServerLimit=64 and
MaxRequestWorkers=1024 via custom-hiera. foremanctl has no equivalent,
leaving the system severely under-provisioned for concurrent workloads
such as bulk host registration.

With only 400 MaxRequestWorkers, httpd begins rejecting connections once
concurrent requests exceed this limit, causing registration failures that
are entirely avoidable with proper MPM configuration.

What are the changes introduced in this pull request?

  • Add event.conf.j2 template to the httpd role with configurable MPM
    event parameters (ServerLimit, MaxRequestWorkers, ListenBacklog, etc.)
  • Add role defaults matching puppet-apache base values (ServerLimit=25,
    MaxRequestWorkers not set — Apache derives it automatically)
  • Add per-profile tuning overrides for medium, large, extra-large, and
    extra-extra-large matching the foreman-installer custom-hiera values
    (ServerLimit=64, MaxRequestWorkers=1024)
  • Add task to deploy event.conf to /etc/httpd/conf.modules.d/

How to test this pull request

Steps to reproduce:

  • Deploy with foremanctl deploy
  • Verify /etc/httpd/conf.modules.d/event.conf exists with
    ServerLimit 25 and no explicit MaxRequestWorkers
  • Deploy with foremanctl deploy --tuning large
  • Verify /etc/httpd/conf.modules.d/event.conf now has
    ServerLimit 64 and MaxRequestWorkers 1024
  • Run httpd -t to confirm syntax
  • Run hammer ping to confirm all services operational
  • Register hosts concurrently — should not hit httpd connection limits

Checklist

  • Tests added/updated (if applicable)
  • Documentation updated (if applicable)

@pablomh
Copy link
Copy Markdown
Contributor Author

pablomh commented May 4, 2026

The errors are infra errors and not related to the change.

Comment thread src/roles/httpd/defaults/main.yml Outdated
pablomh and others added 3 commits May 4, 2026 22:23
Deploy event.conf template for the Apache MPM event module with
configurable parameters via role defaults. This establishes foremanctl
management of ServerLimit, MaxRequestWorkers, ListenBacklog, and
related parameters.

Defaults: ServerLimit=25, ThreadsPerChild=16. MaxRequestWorkers is
only rendered when explicitly set, allowing Apache to derive it as
ServerLimit * ThreadsPerChild by default.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add httpd ServerLimit and MaxRequestWorkers overrides to each tuning
profile, matching the values from foreman-installer custom-hiera
tuning sizes.

All tuning profiles (medium, large, extra-large, extra-extra-large):
  ServerLimit=64, MaxRequestWorkers=1024

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Verify that event.conf is deployed with the expected directives
and that httpd config syntax is valid after deployment.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ehelms ehelms merged commit ade7e44 into theforeman:master May 6, 2026
17 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants