Proxy Error and apache tuning

Hi,

Problem:
During deployment of an image-based host we often get a Proxy Error.
The deployment runs through anyway but it is a little bit annoying.

Expected outcome:
obvious :grin:

Foreman and Proxy versions:
foreman-2.5.4

Distribution and version:
CentOS7

Other relevant data:
In the past (foreman-2.3) we were already able to fix this issue by adding the following tune-up settings in /etc/foreman-installer/custom-hiera.yaml, which seem to be part of the default custom-hiera.yaml (albeit commented-out):

apache::trace_enable: Off
apache::mod::prefork::startservers: 8
apache::mod::prefork::minspareservers: 5
apache::mod::prefork::maxspareservers: 20
apache::mod::prefork::serverlimit: 256
apache::mod::prefork::maxclients: 256
apache::mod::prefork::maxrequestsperchild: 4000

I guess my main question is why we do not set these by default and what possible problems might be connected with setting them by default.
In a way I am surprised that it worked with those settings, because none of them seem to increase any timeout-value :thinking:

@ekohl maybe you have an answer :smiley:

Do you have anything more specific? Like the exact error? Anything like logs from Apache?

Proxy error to what? We proxy various services (Foreman, Pulp, RHSM) so it’s hard to figure out what’s happening if you don’t specify.

We do have tuning profiles that modify some of these:

Then we also have a discussion about switching to the event MPM:

1 Like

I was not aware of the size-tunings in foreman-installer.
Maybe that is already enough to fix the problem, I will check it out and report.

Thanks @ekohl

Proxy Error
The proxy server received an invalid
response from an upstream server.

The proxy server could not handle the request POST /hosts.
Reason: Error reading from remote server

Still trying to reproduce the problem again to grab some Apache-logs :sweat_smile:

/hosts is Foreman. A lot of the HTTP 502 problems were solved with Bug #30803: Use unix socket to bind Puma and Apache to - Foreman but looking back I think that was included in Foreman 2.4 (I updated the Redmine issue) so that shouldn’t play a role.