tursodatabase / tursodatabase/libsql

I keep getting `HRANA_WEBSOCKET_ERROR: WebSocket was closed`

Open
#1,203 8 comments 18 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
17.2k
Forks
531
Avg merge
1h 12m
Merged PRs (30d)
1

Description

From time to time my server is unable to connect to turso database due to this error: sqlalchemy.exc.DatabaseError: (sqlite3.DatabaseError) HRANA_WEBSOCKET_ERROR: WebSocket was closed

This is the sqlalchemy engine configuration

self.db_engine = create_engine(
                url=f"sqlite+{db_url}/?authToken={db_auth_token}",
                echo=False,
                connect_args={"timeout": 60},
            )

dependencies

libsql-client==0.3.0
    # via sqlalchemy-libsql
sqlalchemy==2.0.28
    # via sqlalchemy-libsql
sqlalchemy-libsql==0.1.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report provides no repository file, test, or entry point. Start by reproducing the failure with the shown SQLAlchemy engine configuration and dependency versions, then investigate the intermittent WebSocket closure. Done means the cause is identified and a confirmed fix or workaround is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sqlalchemy, sqlite
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.