Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-13470

Expose puma worker_timeout configuration option

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • 6.12.0
    • Installation
    • 0
    • False
    • Sprint 107, Sprint 108, Sprint 109, Sprint 110, Sprint 111
    • None
    • None
    • None
    • None

      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
        ~~~

              rhn-support-wclark William Clark (Inactive)
              satellite-focaccia-bot Focaccia Bot
              Griffin Sullivan Griffin Sullivan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: