Uncontrolled shutdown of the PostgreSQL container (again)

I have already written about this error here: https://forum.greenbone.net/t/uncontrolled-shutdown-of-the-postgresql-container/22060
Unfortunately, it occurs despite the corrections made:

gvmd-1 | psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
gvmd-1 | Is the server running locally and accepting connections on that socket?
gvmd-1 | waiting 1 second to retry psql connection

Please, help!

Did you take a look at the logs of the pg-gvm container? This issue might be different then before.

Logs in pg-gvm looks like messages in gvmd logs

There must be additional messages with more useful error logs for the pg-gvm container. But nevertheless did you try to restart the pg-gvm container already?

I have now fixed this error by deleting psql_socket volume and restarting the containers, and I do not have any additional logs. As soon as the error appears (and I’m sure it will appear again) I’ll write here.

This is not a solution, as it requires constant manual intervention.

And it appeared:
pg-gvm-1 | 2026-04-08 18:34:31.605 UTC [1] LOG: received fast shutdown request
pg-gvm-1 | 2026-04-08 18:34:31.644 UTC [1] LOG: aborting any active transactions
pg-gvm-1 | 2026-04-08 18:34:31.647 UTC [1] LOG: background worker “logical replication launcher” (PID 86) exited with exit code 1
pg-gvm-1 | 2026-04-08 18:34:31.724 UTC [299] gvmd@gvmd FATAL: terminating connection due to administrator command
pg-gvm-1 | 2026-04-08 18:34:31.772 UTC [81] LOG: shutting down
pg-gvm-1 | 2026-04-08 18:34:31.783 UTC [81] LOG: checkpoint starting: shutdown immediate
pg-gvm-1 | 2026-04-08 18:34:31.801 UTC [81] LOG: checkpoint complete: wrote 0 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.001 s, sync=0.001 s, total=0.029 s; sync files=0, longest=0.000 s, average=0.000 s; distance=0 kB, estimate=236603 kB; lsn=A5/A6FC1018, redo lsn=A5/A6FC1018
pg-gvm-1 | 2026-04-08 18:34:31.851 UTC [1] LOG: database system is shut down

I don’t know what you are doing exactly, but the log is caused by the following: the pg-gvm container is shut down while there seems to be an open connection of gvmd to the database. First of all this is normal behavior. I don’t see anything suspicious.

BUT I don’t have a clue why it was shut down AND this is out of our control. It could be possible that the OOM Killer did hit the process.

I’m not doing anything extraneous. The software is simply deployed in docker community containers, and over time, this error occurs (without any intervention of mine). Unfortunately, because of this, everything breaks down at random moment.

5 posts were split to a new topic: Remark on pg-gvm container / versions

This log entry about a “received fast shutdown request” is quite telling. It suggests that something external to the PostgreSQL process itself is initiating the shutdown. It might be beneficial to investigate what mechanism or orchestrator is sending this signal to the pg-gvm container. Looking into the container’s environment, its parent process, or any health check configurations could offer further insights into the root cause.