Readwrite db connection failed for host db:
Warning: pg_connect(): Unable to connect to PostgreSQL server: could not translate host name "db" to address: Temporary failure in name resolution in /var/www/html/public/lib/dml/pgsql_native_moodle_database.php on line 214
Error

Error

Error: Database connection failed

It is possible that the database is overloaded or otherwise not running properly.

The site administrator should also check that the database details have been correctly specified in config.php

Debug info: <br />
<b>Warning</b>: pg_connect(): Unable to connect to PostgreSQL server: could not translate host name &quot;db&quot; to address: Temporary failure in name resolution in <b>[dirroot]/lib/dml/pgsql_native_moodle_database.php</b> on line <b>214</b><br />

Error code: dbconnectionfailed
Stack trace:
  • line 228 of /public/lib/dml/pgsql_native_moodle_database.php: dml_connection_exception thrown
  • line 283 of /public/lib/dml/moodle_read_replica_trait.php: call to pgsql_native_moodle_database->raw_connect()
  • line 257 of /public/lib/dml/moodle_read_replica_trait.php: call to pgsql_native_moodle_database->set_dbhwrite()
  • line 344 of /public/lib/dmllib.php: call to pgsql_native_moodle_database->connect()
  • line 691 of /public/lib/setup.php: call to setup_DB()
  • line 29 of /lib/setup.php: call to require_once()
  • line 149 of /config.php: call to require_once()
  • line 31 of /public/config.php: call to require_once()
  • line 30 of /public/index.php: call to require_once()