tursodatabase/turso-cli

Cannot connect to database

vhgn opened this issue · 7 comments

vhgn commented

Issue

Production database does not respond

vhgn commented
Error: failed to connect to database. err: failed to execute SQL: SELECT 1;
Post "https://***db***-**username**.turso.io/v2/pipeline": context deadline exceeded

I get this output in CLI

vhgn commented

This simple trick showed that I don't get a response back

console.log("Got request")
const { rows } = await db.execute(`
	SELECT name
	FROM genres
`);
console.log("Got rows", rows);

It never outputted "Git rows..."

gris commented

@vhgn can you check it now?

vhgn commented

It worked! Thanks for the quick response.
Is there anything done wrong on my side?
How can I help preventing this happening in the future?

gris commented

no problem on your side, it was a network connectivity issue of our cloud provider, we have run an automation to fix all clusters that had this issue, but apparently the automation haven't catch all of them. Thanks for reporting

vhgn commented

Does having a starter plan versus a scaler plan have an impact?

gris commented

in a sense yes, because scaler plan clusters don't have scale to zero or group sleeping, and this particular issue wouldn't have happened if it wasn't for a problem when scaling from zero. But this is not the quality of service that we wish to serve to our free tier users anyway. So my apologies