New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to connect to postgres pgbouncer pool #3671
Comments
I've done a bit of debugging & it seems that
|
I've used https://www.npmjs.com/package/patch-package to make a temporary patch for my exact situation as a temporary fix for the moment.
|
If the database you set in our ORM config does not exist (which is checked via IIRC we need to set a database when connecting (that's why the concept of management database was added), but maybe not in all drivers. I can definitely offer making this management database name configurable, maybe we could also just use |
|
FYI I will be reverting this change because of #3769, postgres requires the database name to be present, and apparently defaults to the user name if not provided. So while there was a bug in with the I see you said the |
I'm on digital ocean and just started having this I found out that my pool name was different than my db name, and Mikro-orm was trying to find the wrong database, the name of the pool. I renamed my pool to match my database name and now it's working. |
FYI you can now override the management database name via |
Describe the bug
I've setup a managed pgbouncer pool via digital ocean. I'm able to connect to it via all other clients including psql in the command line. However, mikroorm seems unable to connect to the pool and always says that there's no such "postgres" database, though the db name provided in the configuration for the pool is "pool".
Stack trace
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
It should connect.
Additional context
Add any other context about the problem here.
I have no issues connecting to this managed postgres database without going through the pool.
Versions
The text was updated successfully, but these errors were encountered: