Discourse update stuck with "database system is ready to accept connections"

Hi everyone,
Our Discourse forum has been down for over 24 hours.

I was trying to update Discourse to the latest version, but the rebuild seems to be stuck with the message:

database system is ready to accept connections

I tried applying the solution from this post, but when I run apt install ``docker.io, it fails with this error:

The following packages have unmet dependencies:
 containerd.io : Conflicts: containerd
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

Any help would be greatly appreciated!

Log:

WARNING: Docker version 20.10.7 deprecated, recommend upgrade to 24.0.7 or newer.
x86_64 arch detected.
Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
2.0.20251003-1437: Pulling from discourse/base
Digest: sha256:0db7c9b4598e2a1806658391669d791fd779aa4301fdfbed6a7f322bf64e66ab
Status: Image is up to date for discourse/base:2.0.20251003-1437
docker.io/discourse/base:2.0.20251003-1437
/usr/local/lib/ruby/gems/3.3.0/gems/pups-1.3.0/lib/pups.rb
/usr/local/bin/pups --stdin
I, [2025-10-29T21:17:42.016158 #1]  INFO -- : Reading from stdin
I, [2025-10-29T21:17:42.033764 #1]  INFO -- : File > /etc/service/postgres/run  chmod: +x  chown: 
I, [2025-10-29T21:17:42.040454 #1]  INFO -- : File > /etc/service/postgres/log/run  chmod: +x  chown: 
I, [2025-10-29T21:17:42.047119 #1]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x  chown: 
I, [2025-10-29T21:17:42.053406 #1]  INFO -- : File > /root/install_postgres  chmod: +x  chown: 
I, [2025-10-29T21:17:42.060253 #1]  INFO -- : File > /root/upgrade_postgres  chmod: +x  chown: 
I, [2025-10-29T21:17:42.060804 #1]  INFO -- : Replacing data_directory = '/var/lib/postgresql/15/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/15/main/postgresql.conf
I, [2025-10-29T21:17:42.062792 #1]  INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/15/main/postgresql.conf
I, [2025-10-29T21:17:42.064051 #1]  INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/15/main/postgresql.conf
I, [2025-10-29T21:17:42.069245 #1]  INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/15/main/postgresql.conf
I, [2025-10-29T21:17:42.070261 #1]  INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/15/main/postgresql.conf
I, [2025-10-29T21:17:42.071276 #1]  INFO -- : Replacing (?-mix:#?default_text_search_config *=.*) with default_text_search_config = '$db_default_text_search_config' in /etc/postgresql/15/main/postgresql.conf
I, [2025-10-29T21:17:42.071873 #1]  INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/15/main/postgresql.conf
I, [2025-10-29T21:17:42.072598 #1]  INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/15/main/postgresql.conf
I, [2025-10-29T21:17:42.073127 #1]  INFO -- : Replacing (?-mix:#?log_min_duration_statement *=.*) with log_min_duration_statement = $db_log_min_duration_statement in /etc/postgresql/15/main/postgresql.conf
I, [2025-10-29T21:17:42.073774 #1]  INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres  peer in /etc/postgresql/15/main/pg_hba.conf
I, [2025-10-29T21:17:42.074315 #1]  INFO -- : Replacing (?-mix:^host.*all.*all.*127.*$) with host all all 0.0.0.0/0 md5 in /etc/postgresql/15/main/pg_hba.conf
I, [2025-10-29T21:17:42.074841 #1]  INFO -- : Replacing (?-mix:^host.*all.*all.*::1\/128.*$) with host all all ::/0 md5 in /etc/postgresql/15/main/pg_hba.conf
I, [2025-10-29T21:17:42.075291 #1]  INFO -- : > if [ -f /root/install_postgres ]; then
  /root/install_postgres && rm -f /root/install_postgres
elif [ -e /shared/postgres_run/.s.PGSQL.5432 ]; then
  socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
fi

failed to set locale!
[error] character map file `UTF-8' not found: No such file or directory
failed to set locale!
[error] default character map file `ANSI_X3.4-1968' not found: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = "en_US.UTF-8",
	LC_ALL = "en_US.UTF-8",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
I, [2025-10-29T21:17:43.405389 #1]  INFO -- : Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.

I, [2025-10-29T21:17:43.405986 #1]  INFO -- : > HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/15/bin/postmaster -D /etc/postgresql/15/main
I, [2025-10-29T21:17:43.409259 #1]  INFO -- : Terminating async processes
2025-10-29 21:17:43.688 UTC [44] LOG:  starting PostgreSQL 15.14 (Debian 15.14-1.pgdg12+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14+deb12u1) 12.2.0, 64-bit
2025-10-29 21:17:43.689 UTC [44] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2025-10-29 21:17:43.689 UTC [44] LOG:  listening on IPv6 address "::", port 5432
2025-10-29 21:17:43.915 UTC [44] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-10-29 21:17:44.115 UTC [47] LOG:  database system was interrupted; last known up at 2025-10-29 20:31:48 UTC
2025-10-29 21:17:44.454 UTC [47] LOG:  database system was not properly shut down; automatic recovery in progress
2025-10-29 21:17:44.616 UTC [47] LOG:  redo starts at 150/A40074A0
2025-10-29 21:17:44.616 UTC [47] LOG:  invalid record length at 150/A40074D8: wanted 24, got 0
2025-10-29 21:17:44.616 UTC [47] LOG:  redo done at 150/A40074A0 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s
2025-10-29 21:17:44.742 UTC [45] LOG:  checkpoint starting: end-of-recovery immediate wait
2025-10-29 21:17:45.453 UTC [45] LOG:  checkpoint complete: wrote 2 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.207 s, sync=0.254 s, total=0.722 s; sync files=3, longest=0.177 s, average=0.085 s; distance=0 kB, estimate=0 kB
2025-10-29 21:17:45.490 UTC [44] LOG:  database system is ready to accept connections

You need to upgrade docker. You might also need to upgrade your OS in order to upgrade docker.