Skip to content

Commit

Permalink
Prevent potentially misleading error message about "no heartbeat"
Browse files Browse the repository at this point in the history
In the context of
github.com/os-autoinst/openQA
we observed error messages coming from Mojo::Server::Prefork
when otherwise there is no harmful effect observed. As the underlying
prefork module should only inform about a potentially erroneous
situation but can not know about the effect on any component that uses
the prefork module the log message instead should not claim an error but
rather only inform. Hence this commit reduces the log level from error
to info accordingly.

Related progress issue: https://progress.opensuse.org/issues/138536
  • Loading branch information
okurz committed May 16, 2024
1 parent 431cc0a commit 2b10707
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Mojo/Server/Prefork.pm
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ sub _manage {
next unless my $w = $self->{pool}{$pid};

# No heartbeat (graceful stop)
$log->error("Worker $pid has no heartbeat ($ht seconds), restarting (see FAQ for more)") and $w->{graceful} = $time
$log->info("Worker $pid has no heartbeat ($ht seconds), restarting (see FAQ for more)") and $w->{graceful} = $time
if !$w->{graceful} && ($w->{time} + $interval + $ht <= $time);

# Graceful stop with timeout
Expand Down

0 comments on commit 2b10707

Please sign in to comment.