You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure what I might be doing wrong. Basically if I wait a short while before making first or second connection, I get:
error code = 1: Error executing statement: Hrana: `api error: `{"message":"The stream has expired due to inactivity","code":"STREAM_EXPIRED"}``
2024-08-15T13:47:59.110452Z ERROR libsql_server::hrana::http: hrana server: Stream handle for 15505556566524579603 is expired
I'm running it locally via turso dev --db-file=./dev.db
I'm not sure whether I should be pinging the server before every query? I've tried that, but it seems to not make any difference. Is there a way I should be connecting? I'm using a the most simple way via database/sql in golang. Just a plain ol' conn, err := sql.Open("libsql", "http://...")
The connection is the passed to the sqlc generated function: queries := db.New(conn) which is the passed around by pointer to my services and what not.
Is this the wrong approach or am I missing completely?
Quick edit:
By the looks of it it's only an issue if you're running tuso dev --db-file=.... Obviously, if you just directly point to the file everything is fine, and if you're using the Turso hosted DB it's also fine.
As I understand if you point it to your libsql:/<my-db>.turso.io it also connects via http? Why would it be any different in that case?
The text was updated successfully, but these errors were encountered:
I'm not sure what I might be doing wrong. Basically if I wait a short while before making first or second connection, I get:
I'm running it locally via
turso dev --db-file=./dev.db
I'm not sure whether I should be pinging the server before every query? I've tried that, but it seems to not make any difference. Is there a way I should be connecting? I'm using a the most simple way via
database/sql
in golang. Just a plain ol'conn, err := sql.Open("libsql", "http://...")
The connection is the passed to the sqlc generated function:
queries := db.New(conn)
which is the passed around by pointer to my services and what not.Is this the wrong approach or am I missing completely?
Quick edit:
By the looks of it it's only an issue if you're running
tuso dev --db-file=...
. Obviously, if you just directly point to the file everything is fine, and if you're using the Turso hosted DB it's also fine.As I understand if you point it to your
libsql:/<my-db>.turso.io
it also connects via http? Why would it be any different in that case?The text was updated successfully, but these errors were encountered: