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.
Is there currently something unstable?
Username:
5713tr
19 Replies
Note: Schema changes using the Xata dashboard UI are working.
Hi, is this occuring in partner-tool:dev? Have you noticed it in any other branch?
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.
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
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.
Would you mind sharing the drizzle schema file so we can investigate? Here or at [email protected] for privacy. And what is the schema change taking place resulting in those migrations?
I don't think the schema file is relevant. As I cannot execute the queries even with another tool. E.g. DBeaver
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?
I see
It's activated.
Thank you, we're investigating
DBeaver also has a timeout after 43s. The same as drizzle-kit.
We believe we've found the issue and working on a fix
I'll let you know when to retest
i think it's also having some overhead in there. so about ~40s makes sense.
Thank you! 🙏
@michaelschufi a fix has been deployed, can you try again and let me know?
@kostas It's working again! 🎉 🙏
awesome! I'm glad it is fixed, sorry it took us a while. The issue was with the handling of drop statements specifically.
Ah ok. Yeah, for some reason those indexes are incorrectly introspected and drizzle wants to recreate them every time.