Expose puma worker_timeout configuration option
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2135498
Description of problem:
Currently, we can't configure the worker_timeout used by puma workers. The default of 60s is used.
Changing the worker_timeout would allow users to workaround specific issues happening during peak moments. Here's an example where increasing the timeout would help:
Oct 14 06:08:45 satellite.example.com foreman:  ! Terminating timed out worker (worker failed to check in within 60 seconds): 2420
Version-Release number of selected component (if applicable):
Not possible to change the default 60s timeout in a supported way.
Have an installer option to define the worker_timeout.
The timeout can be defined with the following line on the file /usr/share/foreman/config/puma/production.rb
My suggestion is to add a line on the file /usr/share/foreman/config/puma/production.rb that will read a variable to be defined on the systemd unit, like we do for the number of workers, and min/max threads.
worker_timeout ENV.fetch('FOREMAN_PUMA_WORKER_TIMEOUT', 60).to_i
Then, setting the value FOREMAN_PUMA_WORKER_TIMEOUT on the systemd unit would be enough:~~~
- cat /etc/systemd/system/foreman.service.d/installer.conf
Environment=FOREMAN_PUMA_WORKER_TIMEOUT=120 <============ new variable to define the timeout
#1 Updated by The Foreman Bot 5 months ago
- Assignee set to William Clark
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/puppet-foreman/pull/1091 added
#2 Updated by William Clark 3 months ago
- Project changed from Installer to Foreman
#3 Updated by The Foreman Bot 3 months ago
- Pull request https://github.com/theforeman/foreman/pull/9485 added
#4 Updated by William Clark 3 months ago
- Pull request deleted (
#5 Updated by The Foreman Bot 2 months ago
- Fixed in Releases 3.6.0 added
#6 Updated by Joniel Pasqualetto 2 months ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|e381a3c7c2d7b017e573039d34fe86691315b7db.
#7 Updated by Ewoud Kohl van Wijngaarden about 1 month ago
- Triaged changed from No to Yes
- Category set to Performance
Fixes #35641 - Add FOREMAN_PUMA_WORKER_TIMEOUT
This allows configuring the Puma worker_timeout, which specifies
the time before a worker process that has not checked in will
be restarted. It is not recommended to alter this value in normal
operation as that can mask real bugs or improper configuration.
Co-authored-by: Joniel Pasqualetto <email@example.com>
Co-authored-by: William Bradford Clark <firstname.lastname@example.org>