From 2b1070792341620cf7282db12e1cc648a6e9c03f Mon Sep 17 00:00:00 2001 From: Oliver Kurz Date: Thu, 16 May 2024 13:48:50 +0200 Subject: [PATCH] Prevent potentially misleading error message about "no heartbeat" 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 --- lib/Mojo/Server/Prefork.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Mojo/Server/Prefork.pm b/lib/Mojo/Server/Prefork.pm index e8637312ed..3b248a0386 100644 --- a/lib/Mojo/Server/Prefork.pm +++ b/lib/Mojo/Server/Prefork.pm @@ -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