Skip to content

Improve log messages to help debug worker timeouts #2528

@cjlarose

Description

@cjlarose

Is your feature request related to a problem? Please describe.

Users sometimes encounter Terminating timed out worker messages in puma logs. These messages are generated in one of two cases:

  1. an already-booted worker failed to report itself to the master process within the last worker_timeout seconds (default 60)
  2. a new worker failed to boot within worker_boot_timeout seconds (default 60).

If a user is getting these messages in the log, it's not really clear which situation they ran into and makes it harder to diagnose the problem. See #2527 for an example

Describe the solution you'd like

  1. Log messages should clearly indicate if a worker boot timed out or if a worker failed to "check-in" after boot

Example:

  • Terminating timed out worker (worker failed to check in within 60 seconds): 2006
  • Terminating timed out worker (worker failed to boot within 60 seconds): 2008
  1. The other thing that would be nice is just writing to the logs the amount of time that it look to boot a worker (when it was successful)
  • Worker 0 (pid: 20934) booted in 12.34 seconds, phase: 2

This would be useful to help operators know if their workers are booting close to the timeout threshold or not

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions