No DB connection from docker
Background information
-
Dendrite version or git SHA: Dendrite release 0.11.1 (image)
-
SQLite3 or Postgres?: Postgres
-
Running in Docker?: Docker
-
go version: go1.19.6 linux/amd64 -
Client used (if applicable):
Description
- What is the problem: Cannot connect to the database in docker
- Who is affected: Just Me
- How is this bug manifesting: (monolith_1 | time="2023-02-23T08:08:08.295379567Z" level=panic msg="Failed to set up global database connections" error="failed to find maximum connections: dial tcp 127.0.0.1:5432: connect: connection refused")
- When did this first appear: right after the first installation
Steps to reproduce
- pull repo
- generate passwords, fill dedrite.yaml
- start docker-compose
The database is up and running, i can access it via pgAdmin, but the dendrite container cannot.
Having the same error-message with basic setup according to documentation. When using the "standard" password itsasecret I get another error message
time="2023-03-10T13:52:34.927499897Z" level=panic msg="Failed to set up global database connections" error="failed to find maximum connections: dial tcp xx.xx.xx.xx:5432: connect: connection timed out"
Solution is in PR provided and seems to work. Error has gone and server starts. https://github.com/matrix-org/dendrite/pull/2953
I encountered the same problem. I change max_open_conns to 90 according to #2953, the error is the same.