Bug #35641
Expose puma worker_timeout configuration option
Description
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: [1290] ! Terminating timed out worker (worker failed to check in within 60 seconds): 2420
~~
Version-Release number of selected component (if applicable):
Actual results:
Not possible to change the default 60s timeout in a supported way.
Expected results:
Have an installer option to define the worker_timeout.
Additional info:
The timeout can be defined with the following line on the file /usr/share/foreman/config/puma/production.rb
~~
worker_timeout 120
~~
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.
Like this:
~~
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
[Service]
User=foreman
Environment=FOREMAN_ENV=production
Environment=FOREMAN_HOME=/usr/share/foreman
Environment=FOREMAN_PUMA_THREADS_MIN=5
Environment=FOREMAN_PUMA_THREADS_MAX=5
Environment=FOREMAN_PUMA_WORKERS=6
Environment=FOREMAN_PUMA_WORKER_TIMEOUT=120 <============ new variable to define the timeout
~~~
Associated revisions
History
#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 (
https://github.com/theforeman/puppet-foreman/pull/1091)
#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 <jpasqualetto@redhat.com>
Co-authored-by: William Bradford Clark <wclark@redhat.com>