Project

General

Profile

Actions

Bug #35641

closed

Expose puma worker_timeout configuration option

Added by William Clark about 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Performance
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

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:

~~~
  1. 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
    ~~~
Actions #1

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
Actions #2

Updated by William Clark almost 2 years ago

  • Project changed from Installer to Foreman
Actions #3

Updated by The Foreman Bot almost 2 years ago

  • Pull request https://github.com/theforeman/foreman/pull/9485 added
Actions #4

Updated by William Clark almost 2 years ago

  • Pull request deleted (https://github.com/theforeman/puppet-foreman/pull/1091)
Actions #5

Updated by The Foreman Bot almost 2 years ago

  • Fixed in Releases 3.6.0 added
Actions #6

Updated by Joniel Pasqualetto almost 2 years ago

  • Status changed from Ready For Testing to Closed
Actions #7

Updated by Ewoud Kohl van Wijngaarden almost 2 years ago

  • Category set to Performance
  • Triaged changed from No to Yes
Actions

Also available in: Atom PDF