Skip to content
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

[BUG] MAGE DB Connection to multiple Postgres hosts for HA #5194

Open
farmboy-dev opened this issue Jun 17, 2024 · 0 comments
Open

[BUG] MAGE DB Connection to multiple Postgres hosts for HA #5194

farmboy-dev opened this issue Jun 17, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@farmboy-dev
Copy link

Mage version

0.9.71

Describe the bug

Hello Mage team,

I'm testing Postgres failover with Mage. If primary postgres is down, then standby is promoted to the primary, trigger is hanging infinitely, so i have to restart Mage container. In the production, i think it's not good. Is it a bug? or can you guide me?
Primary postgres down -> can't see info in the DB on UI -> standby is promoted to the primary -> can see info in the DB on UI -> running icon keep spinning -> restart Mage, it works as expected.

MAGE_DATABASE_CONNECTION_URL=postgresql+psycopg2://user:password@/dbname?host=HostA:PortA&host=HostB&target_session_attrs=read-write.

https://mageai.slack.com/archives/C03HTTWFEKE/p1718409165076919

To reproduce

No response

Expected behavior

If DB connection error occurs, Mage should deal with that error, then try to reconnect to available postgres DB based on MAGE_DATABASE_CONNECTION_URL

Screenshots

No response

Operating system

No response

Additional context

I haven't tested this case using Load balancer and two Postgres DB (primary and standby).

@farmboy-dev farmboy-dev added the bug Something isn't working label Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant