57P03: cannot_connect_now
PostgreSQLWhat does it mean?
The server cannot accept connections right now; usually the database is still starting up or performing recovery. Connections can be opened once the system is ready.
Why does it happen?
PostgreSQL was just started and is still in its startup/recovery phase; crash recovery; during a restore from backup; a standby not yet ready to accept queries; a shutdown in progress.
How to fix it
Wait briefly and reconnect; the server accepts connections once startup completes. Monitor recovery progress in the server log. If it takes long, there may be a large WAL replay or a recovery problem. Add retry logic to the application.