tursodatabase / turso-cli

Command line interface to Turso.
https://turso.tech
MIT License
215 stars 35 forks source link

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

Open penberg opened 1 year ago

penberg commented 1 year ago

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
athoscouto commented 1 year ago

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.

penberg commented 1 year ago

@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?