tursodatabase / turso-cli

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

bad connection: failed to read JSON message: failed to read: read limited at 32769 bytes #867

Closed xerosanyam closed 4 months ago

xerosanyam commented 5 months ago

unable to query data on cli

irabinovitch commented 5 months ago

seeing something similar when using the CLI for queries that turn more than a a couple hundred rows. it seems to have started after upgrading from v0.87.7 to v0.95.0 today.

→ select count() from test; COUNT() 10391

→ select * from test; Error: driver: bad connection: failed to read JSON message: failed to read: read limited at 32769 bytes

→ select * from test limit 210; returned expected results

→ select * from test limit 211; Error: driver: bad connection: failed to read JSON message: failed to read: read limited at 32769 bytes

MarinPostma commented 4 months ago

This seems to be an issue with the websocket driver. a workaround is to use https instead: turso db shell https://<db-url>

athoscouto commented 4 months ago

@xerosanyam @irabinovitch you should be able to go around this by doing turso db shell https://$DB_HOST. So if your database URL is libsql://my-db-athoscouto.turso.io, do turso db shell https://my-db-athoscouto.turso.io.

athoscouto commented 4 months ago

@avinassh @haaawk this looks like a bug on the WSS driver, may be affecting not only the shell but the go client as well.

MarinPostma commented 4 months ago

reopening until the patch hits this repo

irabinovitch commented 4 months ago

Confirming this has been resolved. Thank you.