turso-cli icon indicating copy to clipboard operation
turso-cli copied to clipboard

`turso db shell` fails after creating database with same name

Open penberg opened this issue 1 year ago • 2 comments

I did db destroy on a database and then db create with the same name, but now db shell is failing to connect:

Error: failed to connect to database. err: Post "https://gh-next-penberg.turso.io": read tcp 192.168.68.105:53312->66.241.125.39:443: read: connection reset by peer

penberg avatar Jul 26 '23 07:07 penberg

Known bug. No easy way to fix it because of the way we handle DNS and certificates. WDYT about blocking recreating a database with the same name for a while? Not the best experience, but will prevent such issues.

athoscouto avatar Jul 26 '23 10:07 athoscouto

@athoscouto I don't like the workaround because the main reason you want to create a database with the same name is when your database gets in bad state. I found about this problem when I managed to get my database in bad state during migrations and wanted to just re-create it.

What's the complication on fixing this properly?

penberg avatar Jul 26 '23 10:07 penberg