calcom / docker

The Docker configuration for Cal.com is an effort powered by people within the community. Cal.com, Inc. does not provide official support for Docker, but we will accept fixes and documentation. Use at your own risk.
MIT License
646 stars 338 forks source link

Upgrade from 3.1.9 to 3.3.7, massive error logs related to DB on console #299

Closed scebll closed 7 months ago

scebll commented 10 months ago

Greetings!

We have recently upgraded from version 3.1.9 to version 3.3.9 and since the upgrade we are seeing many bugs in the console that are flooding the service.

The errors look like this:

@calcom/web:start: error connecting to engine: sql, type: postgres db: Error: connect ECONNREFUSED ::1:5432
@calcom/web:start: error connecting to engine: sql, type: postgres db: Error: connect ECONNREFUSED ::1:5432
@calcom/web:start: error connecting to engine: sql, type: postgres db: Error: connect ECONNREFUSED ::1:5432
[...]

Apparently it appears to be connecting to a database on localhost (::1) when we are using an external postgresql outside of even the docker service where it is running.

Our environment variables look something like this.

CALENDSO_ENCRYPTION_KEY: <hidden>
DATABASE_URL: postgresql://calcom:superpassword@<ip>/calcom
EMAIL_FROM: <hidden>
EMAIL_SERVER_HOST: <hidden>
EMAIL_SERVER_PASSWORD: <hidden>
EMAIL_SERVER_PORT: <hidden>
EMAIL_SERVER_USER: <hidden>
NEXT_PUBLIC_LICENSE_CONSENT: true
NEXT_PUBLIC_WEBAPP_URL: https://calcom.example.com
NEXTAUTH_SECRET: <hidden>
NODE_ENV: production

Could it be that some change has been made that I missed in the changelog and is producing this error?

There's not much detail either and even increasing the debug level doesn't show any errors other than these lines.

xcellentavi commented 9 months ago

I had the same issue with my instance (running container on unraid with postgresql15) and I switched my network type from bridge to host to stop the infinite ECONNREFUSED errors. It sounds like a network configuration issue with your database and not due to the update. Just a guess, hope that is helpful!

xcellentavi commented 8 months ago

So this error is still occurring for me, I see this is possibly being address in #11911, but still no fix otherwise.