Issues connecting to the database

Hi We are currently experiencing issues when connecting to the Postgres database on eu-central. Mainly, schema changes are not working. But we also had disconnects when reading data or rather when trying to connect to read data.
XATA_BRANCH dev
Using 'pg' driver for database querying
[✓] Pulling schema from database...

Warning You are about to execute current statements:

DROP INDEX IF EXISTS "fields_unique_idx";
DROP INDEX IF EXISTS "tags_unique_idx";
CREATE UNIQUE INDEX IF NOT EXISTS "fields_unique_idx" ON "fields" USING btree (LOWER(label),"eventSeriesId");
CREATE UNIQUE INDEX IF NOT EXISTS "tags_unique_idx" ON "tags" USING btree (LOWER(label),"owner","eventSeriesId");

Error: Connection terminated unexpectedly
XATA_BRANCH dev
Using 'pg' driver for database querying
[✓] Pulling schema from database...

Warning You are about to execute current statements:

DROP INDEX IF EXISTS "fields_unique_idx";
DROP INDEX IF EXISTS "tags_unique_idx";
CREATE UNIQUE INDEX IF NOT EXISTS "fields_unique_idx" ON "fields" USING btree (LOWER(label),"eventSeriesId");
CREATE UNIQUE INDEX IF NOT EXISTS "tags_unique_idx" ON "tags" USING btree (LOWER(label),"owner","eventSeriesId");

Error: Connection terminated unexpectedly
Is there currently something unstable? Username: 5713tr
19 Replies
Michael Schaufelberger
Note: Schema changes using the Xata dashboard UI are working.
kostas
kostas3mo ago
Hi, is this occuring in partner-tool:dev? Have you noticed it in any other branch?
Michael Schaufelberger
in :preview mainly. but we had an error while connecting on :main as well. this was after many retries. so maybe i hit the connection limit - and because they stayed open, :main was affected as well? but the above error is showing up in :dev and :preview as well.
kostas
kostas3mo ago
I suspect it is the connection limiter kicking in yes, as in the logs there are more requests than the limit of 20 concurrent connections around 08:46 CET. But I'll verify with our team. We're still investigating, just making sure there's nothing wrong on "our" end with terminating connections. How long does it take to get the Connection terminated unexpectedly error when you start the migration? We are now pretty confident this issue is not because of connection rate limiting, so if it still occurs it would help to provide an estimate of how long it takes for the error to be returned as it would give us an indication of what causes the connection close
Michael Schaufelberger
Sorry, I was occupied with other things. It's still happening. The time the whole drizzle command takes is ~43s. About ~4s for pulling the schema.
kostas
kostas3mo ago
Would you mind sharing the drizzle schema file so we can investigate? Here or at support@xata.io for privacy. And what is the schema change taking place resulting in those migrations?
Michael Schaufelberger
I don't think the schema file is relevant. As I cannot execute the queries even with another tool. E.g. DBeaver
kostas
kostas3mo ago
You mean the DDL statements in the issue description, or actual queries failing? If it's queries, could you grant us access ("Allow support to view your workspace" from workspace settings) and provide an example statement that errors so we can have a look?
kostas
kostas3mo ago
I see
Michael Schaufelberger
It's activated.
kostas
kostas3mo ago
Thank you, we're investigating
Michael Schaufelberger
DBeaver also has a timeout after 43s. The same as drizzle-kit.
kostas
kostas3mo ago
We believe we've found the issue and working on a fix I'll let you know when to retest
Michael Schaufelberger
i think it's also having some overhead in there. so about ~40s makes sense. Thank you! 🙏
Want results from more Discord servers?
Add your server