Run the test PostgreSQL behind an init and let pg_isready give up before Docker (refs #98)
The server log of a failing job shows every restart as 'untracked child process exited with exit code 2'. A health check that outlives its 3-second timeout leaves pg_isready to PostgreSQL, which is PID 1 in its container; when pg_isready exits the postmaster takes it for a crashed backend and restarts every connection. --init reaps such orphans, and pg_isready -t 5 under a 15-second timeout is never cut off. Same change in docker-compose.yml. ADR 0015. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
72f4cbe0a5
commit
6ea303e1dc
4 files changed
+58
-5
No files matched your search
@@ -74,7 +74,8 @@ internal static class ServiceLog
|
||||
Console.WriteLine();
|
||||
Console.WriteLine($"== {image} {id[..12]}");
|
||||
Console.WriteLine($"Stato: {state?["Status"]}, avviato {state?["StartedAt"]}, riavvii {inspect["RestartCount"]}, OOMKilled {state?["OOMKilled"]}, uscita {state?["ExitCode"]}");
|
||||
Console.WriteLine($"Limiti: memoria {Mib(host?["Memory"])}, /dev/shm {Mib(host?["ShmSize"])}");
|
||||
Console.WriteLine($"Limiti: memoria {Mib(host?["Memory"])}, /dev/shm {Mib(host?["ShmSize"])}, init {host?["Init"]?.ToString() ?? "no"}");
|
||||
Console.WriteLine($"Controllo di salute: {inspect["Config"]?["Healthcheck"]?["Test"]?.ToJsonString()}, timeout {(inspect["Config"]?["Healthcheck"]?["Timeout"]?.GetValue<long>() ?? 0) / 1_000_000_000} s");
|
||||
|
||||
if (state?["Running"]?.GetValue<bool>() == true)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user