Comments (4)
what happens if Supavisor can't establish a connection to the db? i.e. the password both the user used and that's stored in tenants turns out to be incorrect?
Hmm, yeah, that behavior creates an infinite loop in the db_handler
until the manager kills the connection tree 🤦♂️
I'll fix this and make it more robust in a separate PR
from supavisor.
Thanks for reporting! For our internal needs, we want to allow connections even if the database is not responding. However, it, of course, sucks if the client fails on a cold start, especially when it's Postgrex
.
As a potential solution, I suggest adding a wait timeout. During this period, if we receive parameter_status
from the database, we can forward it to the client, or alternatively, send a "stub" packet with a server version of 0.0
.
I prepared a small fix #101, WDYT?
cc @chasers
from supavisor.
@abc3 Just took a look at your PR -- looks like a great solution! This feels right to me. I just ran some tests against your branch and it worked great.
Tangential question: what happens if Supavisor can't establish a connection to the db? i.e. the password both the user used and that's stored in tenants
turns out to be incorrect?
from supavisor.
Could you take a look at #114 fix? It will stop the DbHandler
retries, and the next client connection attempt will relaunch the pools with the correct credentials
from supavisor.
Related Issues (20)
- Isolate tenant's database HOT 1
- Hosted Supavisor closes connection executing query with large result set HOT 1
- Queries on tables that use CITEXT are 4x slower when using Supavisor vs a direct connection to the db HOT 5
- set up a soft upgrade
- Better error when there is no `.` in the username or tenant `reference` in the `options` params HOT 4
- ClientHandler maximum heap size reached with pg_dump HOT 2
- Deploy supavisor for multiple databases HOT 1
- Custom pool implementation with telemetry
- Maybe switch to local pool DbHandler strategy
- Supabase IP Ban Issue with Connection Pooling HOT 6
- Failed to connect using interval private network Postgres
- Revalidate user secrets if Supavisor isn't allowed to connect to the tenant's database
- Supavisor brings down infrastructure after role modification HOT 4
- Handle `Receive query error`
- Extend Helpers.parse_secret/2 to handle nil or empty secrets
- Specify where to get auth token of user to create first tenant HOT 5
- Docs should mention VAULT_ENC_KEY size needs to be 32 chars HOT 3
- LISTEN / NOTIFY appears to be broken after March 26th
- How to config metrics properly HOT 1
- Create a new Bearer Token HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from supavisor.