Database no longer accepting connections after restart
b-e-a-f
HOBBYOP

a year ago

Restarted my database, and can no longer connect to it. I also redeployed, and it still is facing the same issue. Guess it wasn't properly shut down, but it's also not coming back up even though it says it's ready for connections.

Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/e37196cc-d789-4942-bc27-3fa185d86565/vol_3qbkqkr8q71268nh

Starting Container

Certificate will not expire



PostgreSQL Database directory appears to contain a database; Skipping initialization



2025-04-26 09:17:27.161 UTC [6] LOG:  starting PostgreSQL 16.8 (Debian 16.8-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit

2025-04-26 09:17:27.161 UTC [6] LOG:  listening on IPv4 address "0.0.0.0", port 5432

2025-04-26 09:17:27.161 UTC [6] LOG:  listening on IPv6 address "::", port 5432

2025-04-26 09:17:27.164 UTC [6] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"

2025-04-26 09:17:27.171 UTC [29] LOG:  database system was interrupted; last known up at 2025-04-26 09:12:45 UTC

2025-04-26 09:17:27.219 UTC [29] LOG:  database system was not properly shut down; automatic recovery in progress

2025-04-26 09:17:27.223 UTC [29] LOG:  redo starts at 0/16902328

2025-04-26 09:17:27.223 UTC [29] LOG:  invalid record length at 0/16902360: expected at least 24, got 0

2025-04-26 09:17:27.223 UTC [29] LOG:  redo done at 0/16902328 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s

2025-04-26 09:17:27.228 UTC [27] LOG:  checkpoint starting: end-of-recovery immediate wait

2025-04-26 09:17:27.236 UTC [27] LOG:  checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.003 s, sync=0.001 s, total=0.010 s; sync files=2, longest=0.001 s, average=0.001 s; distance=0 kB, estimate=0 kB; lsn=0/16902360, redo lsn=0/16902360

2025-04-26 09:17:27.239 UTC [6] LOG:  database system is ready to accept connections

Requests to the database just spin forever.

Solved

5 Replies

a year ago

Can you try deploying a new database and switching volumes?


a year ago

please don't do that, that could further complicate matters


a year ago

i checked, it works now, looks like a redeploy was all that was needed


b-e-a-f
HOBBYOP

a year ago

Interesting! Yeah after a few tries looks like I'm back up and running again. Thanks @Brody


a year ago

!s


Status changed to Solved brody 11 months ago


Loading...