Running on Turso?

Turso replicas stale or libSQL hitting row limits? We fix it.

Turso puts SQLite close to the user by replicating libSQL databases to the edge, then adds concurrent writes and an embedded local replica on top. The mental model is simple until a read from the nearest replica lags behind a write to the primary, a batch import blows past the row limit on a cheaper plan, or an embedded replica sync fails quietly after a schema change. We work the CLI, the dashboard metrics and the sync log until the edges stop surprising users.

  • Since 2015Fixing technology
  • FreeEstimates
  • US teamReal engineers

turso-sync.log

still stale

What it is

Turso at a glance

Turso is a managed database built on libSQL, a fork of SQLite with server mode, concurrent writes and replication. It is the headline product of ChiselStrike, now Turso, and extends the SQLite model to distributed deployments across edge regions without giving up the file-based simplicity.

By 2026 Turso is a common choice for apps that want SQLite's ergonomics with globally distributed reads. The embedded replica feature lets an application run a local SQLite file that syncs with a remote primary, giving read latency close to zero while writes still get the durability and concurrency guarantees of the server. Common hosts are Cloudflare Workers, Fly.io, Vercel Functions and Node processes.

Type
Managed libSQL database service
First released
2023 as the Turso service, libSQL fork of SQLite started 2022
License
libSQL is MIT, Turso platform is proprietary
Maintained by
Turso, Inc.
Typically used for
Edge-hosted applications, globally distributed SQLite, embedded replicas, Cloudflare Workers and Fly.io backends

The honest version

Turso pros and cons

No technology is all upside. This is where Turso earns its place and where it tends to cause trouble.

Where Turso is strong

  • SQLite semantics with real replicationYou get the ergonomic query model and the zero-config feel of SQLite, with reads served from a replica near the user and writes still ACID against the primary.
  • Embedded replicas eliminate read latencyA local libSQL file syncs with the remote primary in the background, so read queries hit a file on local disk and writes go to the remote. The pattern is unusual and genuinely useful.
  • Concurrent writes via libSQL server modeUnlike raw SQLite in a single process, libSQL in server mode handles concurrent write connections properly, so a web app with many pods can still write without the lock dance.
  • Per-tenant databases are cheapTurso bills per database, which makes patterns like one database per customer actually viable rather than a theoretical idea that the bill makes impossible.
  • Works well on edge runtimesThe HTTP client works from Cloudflare Workers, Vercel Edge Functions and Deno Deploy where traditional pooled TCP drivers struggle, which pairs it naturally with those runtimes.
  • Good CLI and dashboardCreating a database, dumping, restoring, inspecting replicas and rotating tokens are all one command. The feedback loop while developing is noticeably tight.

Where Turso bites

  • Replica staleness is a user-visible behaviorReads from a replica can lag behind writes to the primary by seconds under load. Read-your-own-writes patterns need to be designed, not assumed.
  • Row and database size limits on cheaper plansThe hobby plan caps rows and total database size, and hitting the ceiling returns errors rather than slowing down. The upgrade path is clear but the first bounce can take down a feature.
  • Schema changes across embedded replicas are delicateAn embedded replica that is behind a schema migration will fail to sync until it catches up, and an app that assumed the local file was always current will see broken queries.
  • SQLite type affinity still biteslibSQL inherits SQLite's permissive typing. A column declared INTEGER will happily accept a string, and the bug shows up far from where it was introduced.
  • Smaller ecosystem than PostgresORMs support libSQL, but migrations tools, backup tools and observability integrations are thinner than the Postgres world. Some pieces have to be built.
  • Writes still centralize to the primaryWrites do not fan out to the nearest edge; they travel back to the primary region. Write-heavy workloads from users far from the primary pay that latency per request.

Sound familiar?

Common Turso problems we fix

The Turso problems that bring people to us, and what you have once each one is fixed.

LibsqlError: Replica is behind primary by 847 frames

Users see stale data right after a write

A read from the nearest replica immediately after a write to the primary, before replication caught up. Read-your-own-writes needs to pin the follow-up read to the primary or wait for a sync watermark.

Reads consistent after writes

LibsqlError: Row limit exceeded

Bulk import hits the plan ceiling

A batch backfill that pushed the database past the row or size limit on the current plan, so new writes start failing partway through. Upgrading the plan or splitting the data unblocks it.

Plan sized to real data

Embedded replica sync failed: schema version mismatch

Local replica stops syncing after a migration

A schema migration applied to the primary that the embedded replica cannot replay, so sync pauses and the app keeps reading the old file until someone notices.

Embedded replicas resync cleanly

AUTH_JWT_EXPIRED: token expired

Rotated token kills existing connections

A short-lived auth token that expired, and clients that cached the connection never refresh. Pods start erroring until they are restarted or the token is extended.

Tokens refreshed before expiry

LibsqlError: STREAM_EXPIRED

Long-running query is cut off

A stream that stayed open past the server timeout, usually during a large export or a backfill from an application that was not expecting a 10 second ceiling.

Long operations chunked

SQLITE_BUSY: database is locked

Write contention on embedded replica

A background sync and an application write hitting the same local file at the same moment, where the WAL mode and the busy timeout were not tuned.

WAL and busy timeout tuned

SQLITE_CONSTRAINT: UNIQUE constraint failed

Writes fail after a bad migration

A unique constraint added that the existing data violates, or a sync that replayed a row that was already present after a partial retry. The error is clear; the recovery is a careful dedupe.

Constraints matched to real data

Write delegated to primary, added 42ms

Writes from a far region feel slow

Users on the other side of the world writing against a primary in iad or ewr paying the round trip. The replica serves reads fast, but the write latency is the primary region's latency.

Write region chosen for the user base

What we do

Turso help, from stale replicas to a healthy sync model

Call us for one stale read, or hand us the whole libSQL deployment.

Rescue
Replicas falling behind, embedded sync stuck, or row limits biting in production. We stabilize first and plan the next step from the real data.
Consistency design
Read-your-own-writes patterns that work, write routing to the right region, and a model for when stale reads are acceptable rather than silently dangerous.
Embedded replica integration
Local libSQL files wired into Node, Rust, Go or Bun processes with the sync watermark exposed, so the app knows when its view is fresh.
Migrations
Moving a Postgres or hosted SQLite workload onto Turso without losing uptime, with the schema and data strategy worked out before the cutover.
Multi-tenant layouts
Per-customer databases, provisioning automation, and cost models that scale with the business rather than one big shared database with noisy neighbors.
Managed Tech
A standing watch on replica lag, plan headroom, sync health and token rotation, plus a line to call when an edge region flaps or a migration misbehaves.

How it works

From first message to fixed

  1. Look Free estimate

    Tell us what's going wrong. We look at it, then tell you plainly what's wrong and what it will cost.

  2. Fix

    We fix the cause, not the symptom. If something is down, getting it back up comes first.

  3. Harden

    Backups, monitoring, updates and access, so the same problem can't quietly come back.

  4. Hand back or stay on

    You get a plain-language write-up. Or we stay on for hosting, upkeep and new work.

Often found together

Running Turso alongside something else?

We work on the whole stack, so the problem can be wherever it actually is.

Questions

Turso questions

Something else? Call+1 737 727 7327

When should we pick Turso over Postgres?

Turso wins when SQLite's model fits your workload, when read latency to global users matters more than write throughput, and when you want per-tenant databases. Postgres still wins for heavy writes, complex analytical queries, and workloads that lean on extensions like PostGIS. We often recommend Turso for apps and Postgres for the data platform behind them.

How do embedded replicas actually work?

The application opens a local SQLite file that libSQL keeps in sync with the remote primary. Reads hit the local file and run as fast as any local SQLite; writes are sent to the primary and replayed back into the local file after they commit. The sync is incremental and resumable.

Why do our reads sometimes return stale data?

A read landed on a replica that had not yet pulled the latest frames from the primary. The levers are to pin the read to the primary when you just wrote, to use the sync watermark to wait for a specific commit, or to accept bounded staleness for data where it is fine. Which lever depends on the view.

Can Turso replace Postgres for a Cloudflare Workers backend?

Often yes. Workers do not do well with pooled TCP connections, and Turso's HTTP client is a good fit for the runtime. For apps that need Postgres-specific features you can pair Turso with a Postgres like Neon; for apps that just need a database that fits the edge model, Turso alone is usually simpler.

What happens when we hit the row or size limit?

Writes start failing with a clear error rather than slowing down. The upgrade path is immediate, but if it catches you in the middle of a backfill the application has to handle the failure cleanly. We review the plan headroom as part of any onboarding so this is not a Friday surprise.

How much does Turso help cost?

The first review is free. Share the error you are seeing or the plan details, and we come back with a price before any work is scheduled.

Free estimate

Turso giving you trouble?

Tell us what you're running and what's going wrong. A person reads it and comes back with an estimate.

  • No charge to find out what it will take
  • If it's urgent, say so

Replies come from a person. By sending, you authorize us to email you back. No marketing.