Bug #35641
closedExpose 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
~~~
Updated by The Foreman Bot about 2 years ago
- Status changed from New to Ready For Testing
- Assignee set to William Clark
- Pull request https://github.com/theforeman/puppet-foreman/pull/1091 added
Updated by William Clark almost 2 years ago
- Project changed from Installer to Foreman
Updated by The Foreman Bot almost 2 years ago
- Pull request https://github.com/theforeman/foreman/pull/9485 added
Updated by William Clark almost 2 years ago
- Pull request deleted (
https://github.com/theforeman/puppet-foreman/pull/1091)
Updated by Joniel Pasqualetto almost 2 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|e381a3c7c2d7b017e573039d34fe86691315b7db.
Updated by Ewoud Kohl van Wijngaarden almost 2 years ago
- Category set to Performance
- Triaged changed from No to Yes